In addition to data elements and content blocks, you can also use custom code as an
alternative way to display data in a data repeater or in a page data connection. It's
particularly useful for displaying field data that's inline with text.
Required Editions
Available in: Salesforce Classic
Available for purchase in: Enterprise, Performance,
and Unlimited Editions
Available (with limitations) in:
Developer Edition
User
Permissions Needed
To build, edit, and manage Site.com sites:
Site.com Publisher User field enabled on the
user detail page
AND
Site administrator or designer role
assigned at the site level
When the page is open:
Drag a Custom Code page element from the Page Elements
pane onto the data repeater. Alternatively, if the page has a page data
connection, drag the Custom Code page element directly
onto the page canvas.
To access the fields of the object that the data repeater or page is connected to, type
{! and double-click the expression that you want to display.
Note The object's fields are listed first, followed by the
fields of all parent objects, which use the format
parent_object_name.field_name.
Add any additional expressions or text you require. For example:
To contact {!Name}, call {!Phone}.
where {!Name} and {!Phone} are placeholders for the values of
the Name and Phone fields of each
record.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.