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" tname="target Template or CSElement name" outlist="name of list to contain output" [d="Device Group Suffix"] [resolvetemplatefordevice="A boolean value indicating whether parameter 'd' should be ignored or not."] [wrapperpage="name of uncached wrapper page"]/> [packedargs="stringFromPACKARGStag"] [args="variable1,variable2,..."] [site="site name"] [tid="caller Template or CSElement id"] [ttype="caller Template or CSElement"] [deptype="exists|none"] [<render:argument name="variable1" value="value1"/>] </render:gettemplateurlparameters>
c
(optional, required for explicit mode)c
, cid
, and tname
are set, then context
data is ignored. cid
(optional, required for explicit mode)c
, cid
, and tname
are set, then context
data is ignored. tname
(optional, required for explicit mode)c
and cid
are set. If these three attributes are not set, the called template will be determined by looking at context
data. outlist
(required)name
and value
, corresponding to the variable name and variable value, respectively.d
(optional)resolvetemplatefordevice
(optional)wrapperpage
(optional)c
, cid
, and p
will be preserved. All other arguments are passed as packedargs
to allow for easy wrapperpage creation. packedargs
(optional)args (optional)
site
(optional)site
variable.tid
(optional) eid
Sites variable), and ttype
should be set to CSElement
. By default, if ttype
is not specified, the default is set to Template
and this attribute is set to the id of the Template (stored in the tid
Sites variable)
ttype="CSElement"
ttype
(optional)Template
or a CSElement
. The default value is Template
, and CSElement
is the other legal value. See tid
. 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.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. Although some of the attributes are optional, this tag requires cid, c, and tname.
The possible values of errno
include:
Value |
Description |
---|---|
-10004 |
A required parameter is missing . |
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" args="c,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 Sites 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 > | ||
Oracle JSP Tag Reference |