After you create branding properties, the next step is to reference them as expressions in your Cascading Style Sheets (CSS) or Site.com page elements such as content blocks or custom code elements.
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 |
The expression syntax for branding properties is {!Site.branding-property-name}. For example, if you create a color property with the name HeaderColor, you can insert the property into a CSS or code block by typing {!Site.HeaderColor}.
- Open your CSS or code block.
- Locate the place where you want to insert the expression.
-
Type {!
and a dropdown list of available properties appears.
- Select the property and double-click to enter it on the page.
.site-header {
background-color: #3793DD;
}With branding, you can create a property that maps directly to the HEX
color and then use the property's expression name in your
CSS.
.site-header {
background-color: {!Site.HeaderColor};
}Now the color can be easily changed by any of your site editors by using
the Branding Editor instead of editing the CSS.