Bridgeline Digital Logo
Menu

Styling and Scripting

Your JavaScript and CSS styling can be stored locally in Salesforce or off-platform; for example, Amazon. If you are storing your static resources in Salesforce, calling the files from within the static resource should only be done using URLFOR, never via a hardcoded link.

The most common method of storing the web assets that will be used with OrchestraCMS is to save them within an archive (such as a .zip archive).

Styling

<apex:stylesheet
    value="{!URLFOR($Resource.ResourceName, 'css/StylingFile.css')}" />

 

Scripting

<apex:includeScript 
    value="{!URLFOR($Resource.ResourceName, 'js/ScriptingFile.js')}"/>

When using the apex:includeScript component, prior to the final HTML markup being created, multiple references to the same script will be de-duplicated.

For performance reasons, you might choose to use a static JavaScript tag (i.e. <script>) before your closing <apex:page> tag, rather than this component. If you do, you'll need to manage de-duplication yourself.