You can now embed the template in a new page, filling in the blanks as you go.
- Create a new Visualforce page called MainPage.
- Within the page, add the following markup:
<apex:page sidebar="false" showHeader="false"> <apex:composition template="BasicTemplate"> <apex:define name="body"> <p>This is a simple page demonstrating that this text is substituted, and that a banner is created.</p> </apex:define> </apex:composition> </apex:page>
The <apex:composition> component fetches the Visualforce template page you created earlier, and the <apex:define> component fills the named holes in that template. You can create multiple pages that use the same component, and just vary the placeholder text.
No comments:
Post a Comment