Declare attribute tag in Site builder

We are using attribute tag to get the field values from record to the website.

What we will do if the value already contains a attribute tag?

For that we need to declare attribute that is already in the field.

For example,

you may create an item drilldown template that contains an attribute tag for the detailed description field on an item record:

<%=getCurrentAttribute(‘item’,’storedetaileddescription’)%>

The HTML in the detailed description field may contain an attribute tag for the item name:

<%=getCurrentAttribute(‘item’,’storedisplayname’)%>

For getting all information,We must declare this name attribute as follows,

<%=declareCurrentAttribute(‘item’,’storedisplayname’)%><%=getCurrentAttribute(‘item’,

‘storedetaileddescription’)%>.

NetSuite tag replacement engine scans each page twice to identify the attributes you use in your custom HTML, and then render all the attributes properly on your web pages. The first time it scans a page, the tag replacement engine identifies the attributes used in each tag on the page. At this time, embedded tags are passed over. On the second pass, it replaces all the tags on the page, including tags that are embedded. Use the declareAttribute tag to point to embedded tags.

Leave a comment

Your email address will not be published. Required fields are marked *