Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
render:gettemplateurlparameters
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.
Syntax
<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>Attributes
c
(optional, required for explicit mode)- The asset type which will be rendered using the referenced template, that will be the target of the URL generated. The value of this attribute will be specified on the URL. If
c
,cid
, andtname
are set, thencontext
data is ignored.cid
(optional, required for explicit mode)- The asset id which will be rendered using the referenced template, that will be the target of the URL generated. The value of this attribute will be specified on the URL. If
c
,cid
, andtname
are set, thencontext
data is ignored.tname
(optional, required for explicit mode)- The name of the Template to be called. This is required if
c
andcid
are set. If these three attributes are not set, the called template will be determined by looking atcontext
data.outlist
(required)- Input. Name of the list to contain the parameters. The output list has two columns:
name
andvalue
, corresponding to the variable name and variable value, respectively.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.
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".
c
,cid
, andp
will be preserved. All other arguments are passed aspackedargs
to allow for easy wrapperpage creation.packedargs
(optional)- This attribute contains a series of arguments (name-value pairs) URL-encoded as a string.
args (optional)
- A comma-separated list of Sites variables to be passed as arguments
site
(optional)- The name of the site containing the Template to be referred to by the URL. By default, Sites looks up the value of the
site
variable.tid
(optional)- The id of the template in which this tag is located. If this tag is located in a CSElement, then the value of this attribute is set to the id of the CSElement (stored in the
eid
Sites variable), andttype
should be set toCSElement
. By default, ifttype
is not specified, the default is set toTemplate
and this attribute is set to the id of the Template (stored in thetid
Sites variable)ttype="CSElement"
ttype
(optional)- This attribute identifies whether the code that contains this tag is a
Template
or aCSElement
. The default value isTemplate
, andCSElement
is the other legal value. Seetid
.deptype
(optional)- Input. This attribute specifies whether approval dependency is
exists
, ornone
.exists
(default) specifies that any version of the asset satisfies the dependency condition;none
specifies no approval dependency on the asset.Parameters
- render:argument (optional)
- Nested parameter tag. The render:gettemplateurlparameters tag allows arbitrary argument tags to be added in order to add name/value pairs to the URL to be generated.
Description
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.
Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing .Example
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 origins 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, thetid
attribute is set to the value of thetid
variable. If this code had been located in a CSElement, this attribute would have been set to the value of theeid
variable and thettype
attribute would also have been set toCSElement
. 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>See Also
Home > Contents > Index > Oracle JSP Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.