Adding a header menu to a template

A common requirement for a website is to display a navigation menu as part of the header. In the scenario where each page defines its own header and footer, it is straightforward to highlight a menu option to indicate the page that is currently being displayed. When a template provides the header and footer information, a mechanism is required to allow the page to identify itself to the template, which can then highlight the appropriate menu option.

In this recipe, we will create a Visualforce template that provides header and footer content to four other Visualforce pages: A Home page, an About page, a Contact page, and a Links page. We will then make these pages publicly available via an unauthenticated Force.com ...

Get Visualforce Development Cookbook - Second 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.