Creating a URL tag

The URLCmpnt tag is used to generate a URL to a site area or content item.

This is the format of a URLCmpnt tag:

[URLCmpnt mode=" " context=" " type=" " name=" " portalTarget" " start=" " end=" " ]

To create a URLCmpnt tag:

  1. Click Insert a Tag from a presentation template or element design field. The Tag Helper dialog opens.
  2. Select URL as the tag type.
  3. Select a mode type. This determines the type of URL that is generated. This is added to the tag as the mode=" " parameter:
    portal
    This generates a URL to a portal page. This is used when displaying Web content within a Web content viewer portlet.
    standAlone
    This generates a URL to a Web page. This is used when displaying Web content using the Web Content Management servlet.
    current
    This generates a URL based on the format of the current request. For example, if the current request is a WebSphere Portal request, then mode="portal" is used.
  4. Select whether to display the URL from the current item, its parent or the top item in the current path. This is added to the tag as the type=" " parameter.
  5. Select the context of the item to retrieve the element from. This is added to the tag as the context=" " parameter:
    Selected
    Use this option to select a specific site area or content item. You must then add the name of the item being referenced using the name=" " parameter. You can select an item by clicking Select.
    Current
    Use this option to reference the element from the current site area or content item.
    AutoFill
    Use this option when the element being referenced is determined by the search parameters of a menu, navigator, or taxonomy component. If the tag is not used within a menu, navigator, or taxonomy component, the context will revert to the current item.
    1. If you select Selected, click the Select button to select a specific site area or content item.
    2. If you select Current or Autofill, click Select authoring template to select an appropriate authoring template.
  6. Select Portal Page Target if you want to enter the compound name of the URL mapping of the target portal page in the tag after you add the tag to your design. This can only be used if mode="current" or mode="portal". This is added to the tag as the portalTarget=" " parameter.
  7. Click OK to add the tag to your design.
Once you have added the tag to your design, you can also add the following parameters to the tag:
Table 1. Additional tag parameters
Tag parameters Details
name=" " If you specify name="./itemName", the actual path is not resolved until the item is rendered. This takes slightly longer to resolve than specifying the path to the item.
start=" "

end=" "

The start and end attributes are used to wrap the data returned by a tag within other tags, such as HTML. These attributes are not mandatory.