Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 



Creates a URL for an asset, processing the arguments passed to it from the calling element into a URL-encoded string and returning it in a variable. A vanity URL will be used if available.



outstr (required)
Input. Name of the variable that stores the URL generated by this tag.
pagename (required)
Input. Page name from a SiteCatalog entry.
cid (optional)
Input. ID of the asset that the URL represents. required if c and cid are required parameters by the SiteCatalog entry.
c (optional)
Input. Type of the asset. This parameter is optional, but if c (asset type) is not supplied, rendermode is set to export, and assets of this type have a Filename field, then the file name that the Export to Disk publishing method creates for the asset does not include the information from the Filename field of the asset. We strongly recommend that you supply a value for c.
p (optional)
Input. ID of the parent page.
d (optional)
Device Group Suffix(a string that is common suffix of all the templates written for current device group). For example, if d ='Touch' and parameter tname = 'HomeLayout', the tag will try to find a template with name tname_d i.e. HomeLayout_Touch. If it exists, the tag will return the url of this template, otherwise will simply return the url of the template 'HomeLayout' i.e. actual tname provided.
resolvetemplatefordevice (optional)
true|false. Default is true. If 'false' is provided explicitly, the tag will ignore the parameter 'd' and will not try to find the device group specific template.
addsession (optional)
Input. Whether or not to include session IDs in the URL when a browser is set to reject cookies. true means to encode session IDs in the URL. If this parameter is not specified, it is set to true by default.
dynamic (optional)
Input. Whether to create a static or a dynamic URL for the asset when the page is being rendered by the Export to Disk publishing method. true means to create a dynamic URL even if rendermode is set to export. false means to create a static URL if rendermode is set to export. If this parameter is not specified, it is set to false by default.
deptype (optional)
Input. This attribute specifies whether approval dependency is exists, or none. exists (default) specifies that any version of the asset satisfies the dependency condition; none specifies no approval dependency on the asset.
wrapperpage (optional)
Input. If the target uses an uncached wrapper page, supply this argument with the name of that SiteCatalog page. The pagename argument will be passed as "childpagename". Please note that when using the wrapperpage parameter, non standard arguments are passed as packedargs. Such arguments will need to be unpacked before accessing. Standard arguments such as c, cid, and p will be preserved and not packed.
packedargs (optional)
Input. Previously created URL-encoded packed arguments, in standard form; that is, the output of a previous RENDER.PACKEDARGS tag.
assembler (optional)
Short form name for uri assembler class. Specifying an assembler overrides the default assembler used by Sites to construct URLs. Omitting this value will cause URLs generated by this tag to use the assembler registered with the highest priority in the request property file.
container (optional)
Override attribute that specifies whether the URL will be generated for a servlet container or a portlet container. By default, the current container will be used. For practical purposes, leaving this blank or setting it to servlet should be sufficient. Legal values are servlet and portlet.
fragment (optional)
Optional attribute to specify a fragment on the URL. Fragments, sometimes known as anchors, allow browsers to advance to a specific location in a single web page. ex. http://www.myhost.com/foo.html#thirdParagraph.
satellite (optional)
Override attribute that forces the URL generated to be a URL for either Satellite Server or Sites. By default, the URL will automatically be set to whatever the containing page is set to. Legal values are true (Satellite Server URL) and false (Sites URL).
scheme (optional, required if authority is set)
Attribute that allows the scheme to be set in the URL. The scheme in the case of most URLs refers to the protocol and is usually set to either http or https. If this is left blank (and authority is left blank) then the URL will be relative to the current scheme and authority.
authority (optional, required if scheme is set)
Attribute that allows the user to specify a fully-qualified URL, when used in conjunction with scheme. URLs are of the form scheme://authority/path?query#fragment. For most purposes, authority corresponds to host:port for the given application. Specifying scheme and authority allows for fully-qualified URLs to be created, which is useful for sites with multiple domains and in other cases.
webrootname (optional)
Name of WebRoot to be used for retrieving vanity URL.


Input. Name/value pairs to be passed in and included in the URL.


This tag creates URLs for assets that are not blobs. NOTE: if you are creating links to assets that are being rendered through templates, you should use the RENDER.GETTEMPLATEURL tag instead.

If rendermode is set to export,the tag creates a static URL (that is, a file name for an HTML file) and returns it as a variable. It creates the URL based on the standard Sites page criteria variables c, cid, and p, a page name from a SiteCatalog entry, and other parameters that are described in the following section.

If rendermode is set to live, the tag creates a dynamic URL according to the rules goverend by the current URL assembler.

Based on this information, the tag creates a URL for the asset and returns it to the element that requested it in the variable specified by the outstr parameter. The requesting element can then use the variable to create a hyperlink for the asset.

NOTE: rendermode is set by the system. Users should not explicitly set it.



You use RENDER.GETPAGEURL to create URLs for Sites assets. You cannot use it to create links to other Web sites or HTML files that are created outside of the Export publishing process.

Error Numbers

There are no possible errno for this tag.


The following example is in JSP but the XML syntax is analogous. This code creates a URL for an article asset and stores it in a variable named "theURL":


<a href='<%=ics.GetVar("theURL")%>'> <ics:getvar name='asset:name'/> </a>

This code creates a link to a page displaying a CO_Content asset using a wrapper page:


<a href='<%=ics.GetVar("theURL")%>'> <ics:getvar name='asset:name'/> </a>

See Also