Now you can potentially create Customer/Partner portals that are integrated with your CRM readily, this is big advantage plus that with ease of Visualforce's technology and shorter development life-cycles now you can deliver with a much faster pace.
In this article I will demonstrate how fast we can modify our sites' template to customize the looked and feel our customer, partner, etc portals.
With each new site that you create there are a few new Visualforce pages and components added to your box. some of those are:
User Management Pages:
Now let's take a closer look at the SiteTemplate:
<!-- showHeader is turned off so we won't see any Salesforce standard tabs or sidebar -->
<apex:page showHeader="false" id="SiteTemplate" standardStylesheets="true">
<!-- A section is reserved for header of the site -->
<!-- This section is where you can include the content of each page of your site-->
<!-- A section is reserved for footer of the site -->
Furthermore, it's best to include your logo, log in and out links, any headline that remains the same throughout your site and above all your site navigation menu to be included in the "SiteHeader" component.
The same way, you can modify the "SiteFooter" component to add your site's pages footer template. It's good practice to include your site's shortcuts links and your company copy right message in this section.
Now let's see how we can benefits from all this. At this point you can start adding pages into your site. For your new pages to be able to utilize your template you need to do the following:
<apex:page showHeader="false" standardStylesheets="true">
<!-- Page's Content go here -->
The above code, the Composite component enables the page to use our site template.
Also if you need to overwrite the existing template's section (Insert Component), you will need to add a "apex:define" component with the same name attribute as the "insert" component in the template.
So in order to overwrite the "body" section of the template, you will need write this line:
... You page's body...
And one more thing, in order to be able to use your Static Resources in your force.com Sites, you are required to set the Cache mode of those resources to public. By default all them are in private mode.
Click here to see a usage sample of such template in action: