Generating a URL to a site, site area or content item

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

<URLCmpnt mode=" " context=" " type=" " name=" " portalTarget" " start=" " end=" " />
<URLCmpnt Opens a URLCmpnt tag.
mode=" " This determines the type of URL that will be generated:
portal
This will generate a URL to a portal page. This is used when displaying Web content within a rendering portlet.
standAlone
This will generate a URL to a Web page. This is used when displaying Web content using the Web Content Management servlet.
current
The will generate 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.

If no mode is specified, mode="current" is used.

context=" " This determines which item to generate a URL for.
Selected
Generates a URL to the item specified in the name attribute below.
Current
Generates a URL to the current site, site area or content file that is being browsed by the user.
AutoFill
Generates URLs to the items determined by the search parameters of a menu, navigator or taxonomy component.
type=" " This determines the item type to generate a URL for. Either "site", "sitearea" or "content". This is only required if context="current" or context="selected".
name=" " Enter the name and library of the item to generate a URL for. For example, name="library/item" . If no library is specified, the library specified in the URL of the current page is used. This is not used if context="current" or context="autofill".
portalTarget=" " Enter the name of the URL map of the target portal page. This is only required if mode="current" or mode="portal".
start=" "

end=" "

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

Creating a link using a URLCmpnt tag

This is an example of how to use a URLCmpnt tag to create a link. The text of the link is generated using an IDCmpnt tag.

<a HREF=
"<URLCmpnt context="autofill" type="content" mode="portal" portalTarget="URLMap">"
target="_blank">
<IDCmpnt context="autofill" field="title">
</a>