Creating Attribute Tags for Custom Records and Custom Fields
You can display information from custom records and custom fields on your website by using attribute tags in item/category templates and in the HTML you write for your site themes in Site Builder.
Creating Attribute Tags for Custom Fields
Display information from custom fields on item and customer records by using the custom field ID as the attribute.
For example, to include information from an item custom field with ID custitem1, you can use the following attribute tag:
<%=getCurrentAttribute('item','custitem1')%>
You can find the ID for a field in the following places:
-
attribute – Go to Customization > Lists, Records, & Fields > Record Types. Click the name of the record type. The attribute is listed on the Fields subtab, in the ID column.
-
Custom fields on customer records – Go to Customization > Lists, Records, & Fields > Entity Fields.
Creating RecordAttribute Tags for Custom Records
Display information from custom fields on custom records using the custom record type ID, the ID for the custom record, and the custom field on the record as the attribute.
To display information from a custom record, use the following syntax for the tag:
<%=getRecordAttribute('recordTypeID',id,'attribute')%>
-
recordTypeID – Open a custom record of the type you want to use. On the Custom record Type page, note the value for Internal ID. The number referenced here is the recordTypeID for all custom records of this type.
-
id – Open the list of records for the custom record type you want to use. The ID for each unique record is listed in the ID Column.
-
attribute – Go to Customization > Lists, Records, & Fields > Record Types. Click the name of the record type. The attribute is listed on the Fields subtab, in the ID column.