The mgiPathArgument Tag

Tag Behavior

Use the mgiPathArgument tag to display the value of a path argument from a URL. Path arguments are created when you submit a form using the GET method.


Tag Syntax

The mgiPathArgument tag has no required parameters and four optional parameters. The tag form is:

<mgiPathArgument name="Name" defaultValue="Text"
mode="Mode" delimiter="Character">

Required Parameters:

  • None.

Optional Parameters:

  • name - The name is the name of the path argument to display.
  • defaultValue - The defaultValue is the text that displays if the path argument is not found or if the path argument is blank. If a default value is not specified, an empty string (blank) is displayed.
  • mode - The mode is the function that the mgiPathArgument performs. In "returnAllNames" mode, the names of all path arguments are displayed. In "returnAllValues" mode, the values of all path arguments are displayed. In "returnAll" mode, the names and values of all path arguments are displayed in the format below. If you include the mode parameter, the name parameter is not required.
      Name1: Value1
      Name2: Value2
      Name3: Value3
      NameX: ValueX
  • delimiter - The delimiter is the character (e.g., "_", tabs, etc.) that is used to separate the names and values in returnAllNames and returnAllValues modes. The delimiter is also used to separate multiple values for the same path argument name. The default delimiter is a comma. In order to use special reserved characters such as tabs and backslashes as delimiters, you must use the appropriate Escaped String format.


Example Usage and Output

<mgiPathArgument name="AffilateID">

In this example, an affiliate of the company links customers to the site using an Affiliate ID path argument to identify the customer's origin. The affiliate's ID is displayed for use in a shopping basket order, for example.

<mgiPathArgument mode="returnAllValues" delimiter="\t">

In this example, all path argument values are returned in a tab-delimited string to import into a database.


Suggested Usage

  • Form Processing
  • Affiliate Systems
  • Shopping Baskets


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]