In the last post we went over the basic layout and structure of creating a customer portal from a standard page. Now that we have this knowledge we can go ahead and add extra pages to our site. The following code, specifically the composite component, enables the page to use or previous site template:
<apex:page showHeader="false" standardStylesheets="true">
<apex:composition template="{!$Site.Template}">
<apex:define name="body">
<-- PAGE'S CONTENT GOES HERE -->
</apex:define>
</apex:composition>
</apex:page>
<apex:composition template="{!$Site.Template}">
<apex:define name="body">
<-- PAGE'S CONTENT GOES HERE -->
</apex:define>
</apex:composition>
</apex:page>
All the new pages will now utilize our template! However if you want to overwrite your existing templates data you will need to add a "apex:define" component with the same name attribute as the insert component in the template.
That being said in order to overwrite the body section of the template you will need to insert the following:
<apex:define name="body">
... PAGE'S BODY...
<apex:define>
... PAGE'S BODY...
<apex:define>
Now you can customize the page to a certain extent if you don't want every page to follow the established template.
No comments:
Post a Comment