You can use custom properties in your website by using expression language syntax within a style sheet, code block, widget, or the HTML page editor.
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 |
| To edit only content in Site.com sites: |
Site.com Contributor User AND Contributor role assigned at the site level |
To reference a site custom property in custom code or a content block, use the syntax {!Site.expression_name}}. For example, create a custom property to store the company phone number with PhoneNumber as the expression name. In a content block, enter Contact us at {!Site.PhoneNumber}. When the page loads, it replaces the value that is represented by {!Site.PhoneNumber} and displays “Contact us at 1-800-667-6389” on the page.
- Open a website element such as a code block or widget.
- Locate the place where you want to insert the expression.
-
Type {!
to see the list of available custom properties.
- Select the property and double-click to enter it on the page.