By alexhicks on
Hi,
As a new DruPal user, I am in need of some assistance, I have staarted to make an elaborate DruPal site, but the only thing i'd like to change is for the Forum, some of the topics im posting ar long, so i would like to remove the right sidebar on the forum only.
Could anyone point me in the right direction as to how to do this?
Regards,
Alex Hicks
Comments
Create page-forum.tpl.php
Just copy page.tpl.php to page-forum.tpl.php in your theme directory. Then modify the page-forum.tpl.php so that it doesn't display the right sidebar.
HTH
Arie
Thanks
I have just done that, but it hasnt changed, do i need to change which page the forum points at now? surely its still going to the same place as before, it hasnt been told to point to page-forum.tpl.php yet - where can i do this?
No, should work automatically
The theme should pick this up automatically as long as the page-forum.tpl.php is in the same directory as the page.tpl.php file.
So let's say you are using garland you would get:
/themes/garland/page.tpl.php
and
/themes/garland/page-forum.tpl.php
Just to be sure you could navigate to /admin/build/themes and just hit the Save button. That will clear the cache and that way you can rule out that his is some caching issue.
- Arie
P.S. Have you installed the Devel module? If you haven't you really should because it's a great tool for fixing this kind of stuff.
Add additional code to page.tpl.php
I had the same problem. Creating page-forum.tpl works only for showing forum containers ( list of all the forums in website) and list of current discussions topics. But when I view forum posts, it hadn't use the page-forum.tpl.php and it had used the template in page.tpl.php file so I included this code snippet in the top of the page.tpl.php file (In addition to have page-forum.tpl.php) and it works for me.
Include this code in the top of the page.tpl.php,
thanks & regards,
Manjula A. Weerasinghe
~ http://risingofsilversurfer.blogspot.com ~
Doh!
Hey Manjula,
Thanks! I've been wrestling with the same problem for the last 3 hours! Everything looks great until someone posts a new topic, and then drupal stops using "page-forum.tpl.php." Your simple fix never occurred to me. I was so intent messing around with Path aliases and content-types looking for the "simple" fix.
Still, it seems I've doing something wrong that I should have to resort to this. Did you learn anything more about this "problem"?
Thanks Again
Bob