function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ollie123ollie123 

Templating?

OK, so with Sites I can create a public-facing web site, I can manage the content using the CRM, I can have my customers sign in to do this and that, but how do I use the same web site template across my public-facing pages, with navigation highlighted depending on context, without duplicating the script and mark-up?

 

I suspect most if not all the benefits of using Sites would be wiped out unless it's possible to avoid this kind of duplication, but I've not seen any mention anywhere of page templating or server-side includes.

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent
That depends on how you create your navigation code. Take a look at http://www.colgincellars.com
Message Edited by Bulent on 05-25-2009 10:14 AM

All Answers

BulentBulent

Visualforce supports templates and components for this purpose. Additionally you can specify a template at the site level

(site Template field) and refer it via the {!$Site.Templale} visualforce expression on your pages. Take  look at the sample pages that are created when you create your site

ollie123ollie123

Hi Bulent, Thanks for your reply. Does the templating system support highlighting of navigation based on context?

 

e.g. if someone is in the Products section of a webs site, can "Products" be easily highlighted in the navigation?

BulentBulent
That depends on how you create your navigation code. Take a look at http://www.colgincellars.com
Message Edited by Bulent on 05-25-2009 10:14 AM
This was selected as the best answer