Hi I have a question about forums,

Some of you may know that if you want to modify template for home page without affecting the rest of the site you use syntaxis like this: page-front.tpl.php and adjust that in that file. Similarly you may do it for unique nodes, I think page-12.tpl.php. I am not sure about correct syntaxis on the latter.

Either way, is it possible to homehow feel forum's own tempalate for the forum only? I have tried page-forum.tpl.php as a guess but it doesn't work.

I know I can probably achieve this via css but adding extra tags for the forum mark up, but I like to do it clean way via external template.

Thanks much in advance,
Vlad

Comments

federico’s picture

I use node-forum.tpl.php . I know, node is not the same as page, but maybe this helps...

yan’s picture

Two options that could help:

1) Use a php statement in your page.tpl.php to include custom page-.tpl.php files depending on custom criteria like mentioned in http://drupal.org/node/102873

2) Use the taxonomy theme module to apply a different theme depending on node type or URL. You could, for example, assign an URL alias to all of your forum nodes and pages that starts with /forum. Then you tell taxonomy theme that a different theme should be used for all URLs starting with /forum.

This may also help you.

yelvington’s picture

Documentation is here.
http://drupal.org/node/104316

If you want to force consideration of the node type (which may not in the path), you can add code at the top of page.tpl.php, something like this:

if ($node->type == 'forum') {
  include('page-forum.tpl.php');
  return;
}
f1vlad’s picture

Thanks for your suggestion guys, I tried it out and I decide to use this way:

page-forum.tpl.php

That way I have entire forum covered. If I use node-forum.tpl.php then only forum nodes are taking that theme but not forum index for example.

But this (page-forum.tpl.php) is going to work for me.