Creating Attribute Tags
Use Attribute tags to display information from item, information item, category, and customer records in site themes, item/category templates, and hosted HTML pages.
For example, you might use Attribute tags to display an image in the store detailed description field of your NetSuite generated site, or to capture information retrieved from browser requests, or to display an item from your NetSuite account on a hosted HTML page.
Attribute tags are supported in HTML files hosted in your NetSuite file cabinet, item/category templates, site themes, and email messages generated from orders. To customize email messages go to Commerce > Site Builder > Content > Customize Text.
Web Site tags are not supported in SuiteCommerce Advanced websites.
Attribute tags are not supported in System Email Templates.
Use the table below, in Using recordType in Attribute Tags, to find reference information for creating Attribute tags.
-
For sample code, and links to other topics on creating Themes and Item/Category Templates, read Using Attribute Tags in Site Templates.
-
For sample code you can use to display items from your NetSuite account on hosted HTML pages, read Using Web Site Tags in Hosted Files.
-
To learn how to create Attribute tags for custom records and custom fields, read Creating Attribute Tags for Custom Records and Custom Fields.
-
To learn how to create Attribute tags for standard NetSuite records, read Creating Attribute Tags for Standard Records.
Note that you can use Attribute tags in most description fields on standard NetSuite records, however, to use website themes, customize item/category templates, and use Attribute tags in hosted HTML pages, you must enable the Advanced Site Customization feature.
Using recordType in Attribute Tags
To create an Attribute tag, use the tag component for recordType and an attribute for the information you want to display from the record. For example:
<%=getCurrentAttribute('item','storedisplayname')%>
To learn more about the syntax for creating attribute tags read the following topics:
The table below provides a guide to finding more information about which fields on NetSuite records are available for use in Attribute tags and how to construct them.
Record Type |
Tag Component for recordType |
Notes |
---|---|---|
Item |
item |
For more information, see Item Attributes. |
Information Items |
infoitem |
Only Text and Image or Formatted Text records are available for use in Attribute tags. For more information see, Information Item Attributes. |
Category |
sitecategory |
For more information, see Category Attributes |
Color Theme |
colortheme |
Tags with the colortheme component return colors for the current color theme in #RRGGBB form. For more information, see Color Theme Attributes. |
Customer |
customer |
For more information, see Customer Attributes. |
Custom record |
record ID |
For more information see Creating Attribute Tags for Custom Records and Custom Fields. |
Order Email Messages |
salesorder |
For more information, read the topic, Attribute Tags for Use in Email Messages. |
|
site |
Used for site-wide properties, such as capturing referrer information from visitors on your site. For more information, see Site Attributes |
|
request |
Used for returning information about the session to include in any custom JavaScript. For more information, see Request Attributes. |
|
checkout |
Used in the Order Script Tracking HTML field at Commerce > Websites > Website List on the Analytics subtab. Checkout Attributes capture data related to the order amount, shipping, and tax. |
Thank You page |
confirmation |
Used to capture data from orders placed on your website, and to send this data to third-party reporting tools. For more information, see Order Confirmation Attributes. |