Howto: Communicate between template- and inner- pages.

This post is as much about me asking a question as it is about providing a solution, so don’t let me down community. I got your back, but you’ve got to scratch mine too.. A little to the left, ah yeah, that’s it. The topics in question here are page templates, their controllers, and the pages (and the controllers) that use the template. But first let’s start with what I’ve discovered.

I like using page templates, they make my life easier. If I’m creating a site I probably want to have some consistency of navigation, page header, search etc. across all my web pages. So let’s assume I have the following setup:

1. A VisualForce page I use as a template.

2. A controller for this page that handles navigation, searching etc.

3. Several ‘inner’ VisualForce pages that use this template.

4. A controller for each of these pages.

Read more