By Infinitee on
Hi,
Customized bluemarine theme
Drupal 5.7
Gallery2
phpBB3
I have my page.tpl.php set to display both left and right sidebars and created another page-tutorials.tpl.php without the sidebars but, it still shows them.
Code for page-tutorials.tpl.php:
<table border="0" cellpadding="0" cellspacing="0" id="header">
<tr>
<td id="logo">
<?php if ($logo) { ?><a href="<?php print $base_path ?>" title="<?php print t('Infinitee Exceptional Artists Community') ?>"><img src="<?php print $logo ?>" alt="<?php print t('Infinitee Exceptional Artists Community') ?>" /></a><?php } ?>
<?php print $search_box ?>
</td>
</tr>
<tr>
<td colspan="2"><div><?php print $header ?></div></td>
</tr>
</table>
<div id="footer">
<?php print $footer_message ?>
</div>
<?php print $closure ?>
Am I missing something or is there another way to create custom page template?
Thanks in advance,
Ralph
Comments
This is what I use
This is what I use http://drupal.org/node/159044
Just create a template.php file and insert the code from the above post. Then upload the template.php file to your default theme directory. I've been using this for quite a while and it works good although it won't work for D6
$template_filename = $template_filename . '_' . $path_part;
When you use this do you use it as is or do you have to manually add suggestions?
$template_filename = $template_filename . '_' . $path_part;
Like this???
Infinitee Designs
http://www.infinitee-designs.com/
Ralph Manis
Infinitee Designs
https://www.infinitee-designs.com/
https://www.infinitee-designs.com/webdesign
https://www.infinitee-designs.com/t-shirts
*
if you're using aliases (pathauto perhaps) then try this: http://drupal.org/node/139766
If you're using a content type called 'tutorials' you can try adding this to the top of your page.tpl.php
<?php if ($node->type == 'tutorial') { include 'page-tutorial.tpl.php'; return; } ?>(although some say it's not recommended, it does work.)~silverwing
_____________________________________________
Land of Midnight | MisguidedThoughts | showcaseCMS
You have to tell the theme
You have to tell the theme engine about the template file, try this in the template.php file for your theme:
===
"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
Still not working...
I am new to this stuff so please be specific with explinations. I tried adding 'page-tutorials' as well as 'page-tutorials.tpl.php' and neither seems to work. I am assuming that if I do get this to work that I can add multiple template pages? Something like this...
$template_filename = $template_filename . 'page-tutorials.tpl.php,page-login.tpl.php,page-whatever.tpl.php' . $path_part;
or
$template_filename = $template_filename . 'page-tutorials,page-login,page-whatever' . $path_part;
Which ever is correct.
This is my template.tpl.php: - http://community.infinitee-designs.com/tutorials
Here's the page-tutorials.tpl.php:
And the page.tpl.php
Infinitee Designs
http://www.infinitee-designs.com/
Ralph Manis
Infinitee Designs
https://www.infinitee-designs.com/
https://www.infinitee-designs.com/webdesign
https://www.infinitee-designs.com/t-shirts