By bryank on
I am sure this question has been asked before but my initial searches didn't turn up much...sorry I am in a rush.
Basically, I am building a site that across ALL pages will share similar things.
1. Logo
2. Navigation (except when secondary navigation is needed)
3. Core Wrapping HTML (i.e; a main wrapping div, etc...)
4. Footer links
Homepage has 3 columns of information, secondary pages have 2 columns.
Most of the examples I see talk about having the TPL.php files as the same name as the template its using...which in my case won't work since I could have 30 pages using the secondary layout, and just the homepage using a different layout.
What is the solution for this?
Thanks,
Bryan
Comments
if just the home page will
if just the home page will have a different layout, you only need page.tpl.php (standard layout) and page-front.tpl.php (home/front page layout).
The other option would be the panels module, but that's not yet ported to d6.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Thx
Would I then need to do a check in template.php similar to
if (drupal_is_front_page()) {
$vars['template_files'] = $page-front;
}
?
no.. just rename the page
no.. just rename the page layout for your front page to front-page.tpl.php and create page.tpl.php for the rest of the pages
no need to do anyhing to template.php
except the name of the
except the name of the template suggestion for the front page is "page-front.tpl.php"
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz