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 ...

Get Visualforce Development Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.