Inclusion

A simple way to create modular Visualforce pages is to use the include component. It embeds the content of the included page in the current page. The pageName attribute specifies the name of the Visualforce page to include. The included page must be a Visualforce page. You cannot include arbitrary URLs.

Listing 7.10 provides an example of using the include component. It embeds the page named SkillsMatrix between two horizontal rules.

Listing 7.10 Visualforce Page Using include

<apex:page>  <hr />  <apex:include pageName="SkillsMatrix" />  <hr /></apex:page>

When a single Visualforce page ends up containing multiple controllers due to the include component, controllers are isolated from each other and ...

Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.