Hi everyone,
I'm fairly new to Drupal. My drupal site has multiple projects on it. The projects contain news and memo items. This whas created with the views module by filtering certain taxonomy terms.
Ok that said:
Per project page (which is a view), i want to have a different theme, other than the rest of the website.
Right now my site contains 3 columns: navigation(left with blocks & menu etc), middle(content), right(blocks etc). || ||
I'd like to have the right side region to vanish at my project (views) pages. The best thing would be if i could connect the theme without the right sidebar to the views. (easy to clone afterwards, there are lik 52 projects......)
I really hope someone could help me (and maybe others with the same question) out.
Thanks in advance,
Aeroniro
Comments
The simplest way would
The simplest way would probably be to give your project views a consistent URL path (eg something like project/[name], or project/[argument]).
You could then set up the blocks in the right sidebar to not display for any page with the path project/*, and the sidebar should disappear.
Alternatively, you could use some PHP in your theme to make the entire sidebar disappear for any page with the path project/*.
Thanks adam
Adam thank ou very much, I'm going to try your first solution.
I'm not really good with PHP. At least writing it myself. I can understand though.
But first i'll try your solution!
Found one
Again, adam_b, thanks alot for pushing me in the right direction.
Now I have done this:
I got the sections module: http://drupal.org/project/sections
In the sections configuration i putted that "themeX" will only be shown on, project/*
So i only have to correct some paths now, and it will work!
I'll make a theme now which has no right region. Any tips on doing that?
Thanks again!
Sorry, I'm not much use at
Sorry, I'm not much use at theming. You can find more information at http://drupal.org/theme-guide.
In most themes, a sidebar will collapse automatically if there's nothing in it, if that helps.
Yes youre right,
yes youre right. but the thing is that i dont want users to disable blocks on a page everytime. Too much work etc..
i'd like to keep it simple for them.
next to that i have too many blocks to disable everytime i create a new projectpage. (view)
There will be many of these pages.
So i'll make a template and create a project section in it.
Adam, maybe you also know an answer to my other question: http://drupal.org/node/539464
;) thanks anyway
Try this ...
The following works in Drupal 6. It will remove the 'left' and 'right' regions on any page that uses page.tpl.php while displaying the output of your module. Of course, you will nee to replace module with your module name. You can go farther and modify or even add your own variables that will be used accessible from page.tpl.php
I have used the arg() function to make sure that the region will no be unconditionally remove, which would be a silly thing to do using a module instead of simply editing page.tpl.php (dahhh).
So basically, if your module has defined a menu path like 'one_of_my_module_menu_path', the function will remove the left and right regions on any page that will have a link having one_of_my_module_menu_path in the first part.
Cheers
Live long ... and prosper!