Show TOC Entering content frame

Function documentation Custom Tags Locate the document in its SAP Library structure

Use

You create dynamic functionality in themes using custom tags interspersed within the standard theme HTML, created by administrators in Web Auctions Administration. Custom tags are used as special placeholders indicating to the system which parts of the content should be replaced by values retrieved from the backend when a theme is processed by a theme parser.

Integration

Custom tags can be intersprersed with standard theme HTMLs.

Prerequisites

You have created a theme.

Features

Web Auctions: Selling via eBay® tags currently support substitution type functionality, in which the contents of a tag are replaced with other values, depending on the properties and property values the tag declares.

When a theme is processed during auction creation, the system will attempt to parse, or add structure to, all custom tags in the theme. The system finds the tags and processes them according to the actions or behaviors assigned to the tag. The system also parses the tags properties and the resulting values are used as keys to identify and retrieve corresponding backend information. Depending on the theme context, tag properties can also be used by the system to influence application behavior.

The system processes one tag after the other until it reaches the end of the theme. Once the processing is complete, the system generates the output, and it is now ready for use in the auction.

Custom tag syntax follows a standard format of xml-namespace moniker, tag element name, adjoining name/value pair properties and a namespace value of sap.

Example

<custom_tag>::=<xml-namespace>:<tagname>[<property_name>=”<value>”]

Any tag that starts with the sap namespace will be recognized as a custom tag.

General tag requirements are as follows:

·        Each tag in a theme must have a unique id

·        Tags can replace content between block-level and non-block HTML elements (div, p, span, etc).

·        Tags can substitute an HTML property value, for example a URL of an image tag.

This can be done one time for each HTML element, in other words, you can not replace ultiple HTML property values with multiple custom tags.

·        Tags have to be used within HTML. They can not be used in non-HTML elements, such as CSS style blocks.

 

You can use the tag name var in Web Auctions Selling via eBay®.

var (short for variable) is a place holder tag, used to retrieve a text value from the backend. The entire tag is replace with the corresponding text during final output. It is a single tag which has the tag ending: <sap:var…/>.

The var tag has the following properties:

·        id

The id property must be unique for each custom tag used within a theme.

·        type

The type property is used by the system to retrieve a replacement value for the tag. It cross-references the type property value with the specific product id of the product being auctioned.

·        previewValue

The system uses this property to substitute content which would normally be filled by backend information. When a theme is being created there is no specific product designated, so the system uses the previewValue property instead.

The format of the value is <typename>$<index>. There are three valid typenames:

ˇ        productDescription

ˇ        imageURL

ˇ        productURL

The index indicates the product in the auction, for example first or second product in the auction.

·        clientText

The system uses this property when applying a them to an auction. It creates the label and input field on the application interface. The system uses the label and input field values to replace the substitute values in the type property.

Example

In the following example, the theme tag has various sections which are read by the system and processed in the following manner:

·        System notes the tag element name, in this case var.

·        System processes the tags properties:

·        The system replaces the entire tag with the value from the backend, indicated in the type property. This is because the tag element name is var.

Example

Raw Source:

<img id=”productimage” src=”sap:var id=”imageURI”  type=”imageURL$1”

clientText=”Enter the prdocut Image URL”

previewValue=”http://www.sap.com/images/blank.gif” />” />

 

Generated Output:

<img id=”productimage” src=”http://someurl.com/directoryname/imagename/.jpg” />

 

 

Leaving content frame