Defining Custom Web Site Tags
You can make your own custom tags to use in item or category templates and site themes. Use custom tags to repeat lines of custom HTML that you've created. You can also use custom tags to combine HTML with NetSuite item attribute tags to show information from a NetSuite record on your website.
By using custom tags, you don't have to enter a code snippet more than once. This gives you one place for your custom HTML, and it shows up everywhere you use the tag on your site.
Tag Substitution
You can also use custom tags in Tag Substitution. Tag Substitution on Tabs and Categories lets you change what your custom tag shows on certain pages of your site.
For example, if a site manager wants to hide search and navigation portlets on some tabs but not others, they can do it with tag substitution. First, create custom tags for each portlet by pasting the HTML code from the site theme into the portlets into custom tag records. Next, replace the HTML code in the theme for those portlets with custom tags. Finally, on each tab record that should be hidden, enter a tag substitution. For more information, see Using Tag Substitution on Tabs and Categories.
Creating Custom Tags
Create custom tags to display information on your site. You can use custom tags to repeat lines of custom HTML, to combine HTML with attribute tags to display information from a NetSuite record on your website, or with tag substitution.
When you create a custom tag, you can use it in the following places:
-
Item records, in the store description field
-
Category records, in the brief and detailed description fields
-
Item/Category templates
-
Site themes
Web Site tags are not supported in SuiteCommerce Advanced websites.
To create a custom tag:
-
Go to Commerce > Site Builder > Content > Tags > New.
-
In the Tag field, enter a name for your tag using all capital letters with no spaces.
When you use this tag elsewhere in NetSuite, you will surround the tag with angle brackets. Do not enter the tag name with brackets here.
-
In the Description field, enter an internal description about the purpose of the tag.
-
In the Default Value field, enter what should appear when you do not define a substitution value on a tab or category record for this tag.
Here, you can enter HTML, a combination of HTML and attribute tags, or a standard block of text.
-
Click Save.
Do not use custom tag names that have the same names as HTML elements. Also, do not create custom tag names starting with 'NL' as this naming may conflict with default NetSuite tags.