Can I create a several "view.php" wrappers to assign to single pages?

Permalink
I have a site with quite a lot of single pages but only two or three different headers and footers, depending on the area of the site that the user is in.

I gather that you can, within your theme, have a view.php file that wraps all single pages, or name a php file after your single page view to wrap just that page. However, is it possible to create, say, three different single page templates, which can be assigned to multiple single pages to create, say, an "electrical goods" theme, a "clothing" theme and a "sporting goods" theme. This would allow me to reuse elements much more easily, so I would only need to maintain one template for each "theme" rather than create a template file for each single page which will each be doing the same thing - pulling in the relevant header.

 
hutman replied on at Permalink Reply
hutman
I have never seen this done before, however if the only thing you are switching out is the header and the footer, you could put some kind of if statement in the view.php to grab the correct header and footer files based on where you are in the sitemap or a specific page attribute that you assign to the pages.