By timhobert on
I'm creating a site where there will be 6 different page layouts (a front page layout, then 5 different internal page layouts) and an unknown number of pages (pages will be added over time and I'd like to make it easy to select a page layout from a pre-defined list, and then add content to each region of the selected template easily via a single form.
Is this possible with Drupal? and if so, how would I do it?
Thank you!!!
Comments
In drupal there is a naming
In drupal there is a naming convention for the page templates.
In your theme, you could for example copy page.tpl.php and paste it and rename the copy to page-front.tpl.php and this template would be used for whatever page is your front page.
You can also create page templates to be used based on paths.
page-front.tpl.php versus CCK-based templates
So I'd created 6 different page.tpl.php files, each with different divs that could be themed using css?
How would I indicate that a page was to use a specific one of the page.tpl.php's? (Layouts are going to be chosen somewhat arbitrarily, not really based on paths.)
I was thinking I'd use CCK and create a separate content type (and maybe even separate fields) for each layout, then theme the output of each of those content types. But then that would put the theme name in the URL, right?
Maybe bit simpler?
I think you'r approaching this with to much thought.
Maybe you could create 6 content-types. Then create your 6 custom templates which are then named appropriately to allow drupal to target when a node of a content type is shown.
content type name = content_one
template file named = node-content_one.tpl.php
Have a look here
http://drupal.org/node/17565
Doing it this way also offers future benefits like using views to display only a specific content type etc. or something more advanced!
hope this helps