Developer manual
copy
Include the output of the copy tag
Updated: Type: springtag
Method
<copy option="value"/>
Current Experimental
Request Attributes
| Attribute | Type | Description | Default | Required? | |
|---|---|---|---|---|---|
| current | id | string | The id of the field to reference By default if the xml contains more than one matching id, the first instance is returned |
Yes | |
| current | page | string | The id of the page to reference | -current page- | No |
| current | table | string | The table containing the page to reference Allowed values: pages, products, assets |
pages | No |
| current | dateformat | string | Format the output value using dateformat rules. Allowed values: If the content of the value being is output is not a valid date/time string, the dateformat is ignored. Valid date format characters - see /view/plugins/option-dateformat - which has been Base64 Encoded. • The date format MUST be base64 encoded. i.e. If the dateformat is 'd F Y', it should be entered as: <option value="dateformat">ZCBGIFk=</option> • Only used if 'date' is in the 'show' attribute. • The default of 'd F Y' outputs the date in the format: 1 December 2013 |
No | |
| experimental | node | string | name of the parent node in the xml to return the result from If not set, the first instance of the field value will be returned |
-first instance- | No |
| experimental | else | string | Value to return if no matching field is found | No | |
| experimental | depth | number | No | ||
| experimental | lang | string | No | ||
| experimental | source | option |
Allowed values: page, session, navigation
|
page | No |
| experimental | format | string | name of an xslt to modify the results of the xml Spring will query the database using the table and page attributes, processing the results with the template specified in format prior to selecting the id from the xml output |
No |
Examples
#1
Request
<copy id="stagenumber"/>
Returns the value of the "stagenumber" field on the current page, or nothing if the field is empty
#2
Request
<copy table="assets" page="banner" id="html"/>
Returns the value of the "html" field of the page "banner" in the "assets" table, or nothing if the field is empty
#3
Request
<copy id="publishdate" dateformat="ZCAvIG0gLyB5"/>
Formats the publishdate (2013-07-13 16:00:00) according the date format output rules.
Response
13 / 07 / 13