Defining Custom Web Site Tags

You can create your own custom tags to use in item/category templates and site themes. Use custom tags to repeat lines of custom HTML that you created. You can also use custom tags to combine HTML with NetSuite item attribute tags to display some text or information from a NetSuite record on your website.

By using custom tags you do not have to enter a code snippet more than one time. It gives you one place to use custom HTML that will then apply everywhere in your site where the tag exists.

Tag Substitution

You can also use custom tags in Tag Substitution. Tag Substitution on Tabs and Categories enables you to change what your custom tag displays on certain pages of your website.

For example, a site manager wants to hide search and navigation portlets on some tabs but not others. This can be done with tag substitution. First create custom tags for each portlet by pasting HTML code (found in the site theme) for 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:

Important:

Web Site tags are not supported in SuiteCommerce Advanced websites.

To create a custom tag:

  1. Go to Commerce > Site Builder > Content > Tags > New.

  2. 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.

  3. In the Description field, enter an internal description about the purpose of the tag.

  4. 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.

  5. Click Save.

Important:

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.

Related Topics

General Notices