Home > Contents > Index >
Looks up all of the URL parameters that would have been set into a URL and returns them in the form of a List instead of as a URL.
<RENDER.GETTEMPLATEURLPARAMETERS [C="asset type"] [CID="asset id"] [CONTEXT="context override"] [DEPTYPE="exists|none"] OUTLIST="name of list to contain output" [PACKEDARGS="stringFromPACKARGStag"] SITE="site name" SLOTNAME="name of slot" TID="caller Template or CSElement id" [TNAME="target Template or CSElement name"] [TTYPE="caller Template or CSElement"] [VARIANT="template variant name"] [WRAPPERPAGE="name of uncached wrapper page"] /> [<RENDER.ARGUMENT NAME="variable1" VALUE="value1"/>] </RENDER.GETTEMPLATEURLPARAMETERS>
c
(optional)c
, cid
, and tname
are set, then context
data is ignored. cid
(optional)c
, cid
, and tname
are set, then context
data is ignored. context
(optional)c
, cid
, and tname
are not specified, then this attribute value will be examined to determine which template will be used and which asset for which a URL will be generated. If this value is not specified, then an ICS variable of the same name will be examined for the same purpose. If no context
value can be located, then the URL will not be generated, and this tag will do nothing. Future versions of CS Direct will provide an interface that allows the context
data to be set automatically. Manually overriding this value should be considered an advanced technique.deptype
(optional)exists
, or none
. exists
(default) specifies that any version of the asset satisfies the dependency condition; none
specifies no approval dependency on the asset.outlist
(required)name
and value
, corresponding to the variable name and variable value, respectively.packedargs
(optional)site
(required)slotname
(required)slotname
attribute.tid
(required) ttype
should be set to CSElement
. tname
(optional)c
and cid
are set. If these three attributes are not set, the called template will be determined by looking at context
data. ttype
(optional)Template
or a CSElement
. The default value is Template
, and CSElement
is the other legal value. See tid
. variant
(optional)wrapperpage
(optional)c
, cid
, and p
will be preserved. All other arguments are passed as packedargs
to allow for easy wrapperpage creation. This tag returns a list of all of the parameters that would have been present in the URL when generated using the RENDER.GETTEMPLATEURL tag. In some cases, the parameters are more important than the actual URL, and this tag provides access to them. It follows through the same variable resolution as the gettemplateurl tag, so details about how the attribute interact can be found in the gettemplateurl documentation.
The possible values of errno
include:
Value |
Description |
---|---|
-10004 |
A required parameter is missing . |
The following example is in JSP, but the XML syntax is analogous. The following example contains an excerpt from the FirstSite Mark II Product_C AddToCart template. It constructs a form which contains all of the parameters that would ordinarily have occurred in the URL as hidden input fields.
In this tag, most of the attribute values are set from other variables in the variable space, either because they have been passed in, or because they have been explicitly looked up. The following table describes the origin of the ICS variables referenced below.
Variable name | Origin |
---|---|
site | The site variable is set as a resarg in all of the templates and SiteEntry assets. As such, it can be expected to be set correctly to the name of the current site. |
tid | The tid variable is set in the resargs of the called template. Because this code is in a Template, the tid attribute is set to the value of the tid variable. If this code had been located in a CSElement, this attribute would have been set to the value of the eid variable and the ttype attribute would also have been set to CSElement . See above for details. |
c | The c variable is specified on the URL and is passed unchanged into the Layout template. |
cid | The cid variable is specified on the URL and is passed unchanged into the Layout template. |
p | The variable p is specified on the URL and is passed unchanged into the layout template. |
LayoutVar | This variable is looked up from the template's map. |
WrapperVar | This variable is looked up from the template's map. |
<%-- Look up the parameters --%> <render:gettemplateurlparameters outlist="args" tid='<%=ics.GetVar("tid")%>' slotname="AddToCart" site='<%=ics.GetVar("site")%>' c='<%=ics.GetVar("c")%>' cid='<%=ics.GetVar("cid")%>' tname='<%=ics.GetVar("LayoutVar")%>' wrapperpage='<%=ics.GetVar("WrapperVar")%>' > <render:argument name="p" value='<%=ics.GetVar("p")%>'/> </render:gettemplateurlparameters> <%-- create a form, note the method is POST --%> <satellite:form method="post" id="AddToCartForm"> <%-- Loop through all of the url parameters and set them into the form as hidden fields so the data is sent back to CS as needed. These variables will include pagename, wrapperpage, c, cid, p, possibly rendermode and possibly others. --%> <ics:listloop listname="args"> <input type="hidden" name="<string:stream list="args" column="name"/>" value="<string:stream list="args" column="value"/>" /> </ics:listloop> ... </satellite:form>
Home > | Contents > | Index > | ||
![]() |
FatWire XML Tag Reference |