I'm working on a custom theme and I have two page templates.
Template 1 is the default template. Template 2 is identical to template 1, except the layout is slightly modified.
Now, I have some more nodes for which I would like to use template 2 (the slightly modified layout).
The only way I know of to do that is to duplicate the template for each node and modify the node id.
Rather than create a bunch of identical templates that must be maintained, I'd rather make template 2 generic (call it something like
page--alt.tpl.php) and then specify which pages should use that template (I'm guessing that would go in my theme's preprocess hook).
Is there a way to do that?
I will look into Panels and Context to see if I can figure it out. This is an inherited project and the ways in which panels and contexts are being utilized isn't clear, especially for someone like me who hasn't really worked with either module.
That's why I was attempting to solve the issue at the theme level.
Here are a few more details that may help:
- The client isn't worried about being able to configure which layout is used. This is a one-time thing for a certain subset of pages. If configuration is necessary, that functionality will be developed in the future.
- In particular, we need all pages under a certain path to use this alternate layout. For example, we need to enforce this layout for
I'll spend some time learning panels and contexts, but perhaps these details will help inform other solutions?