Hi, drupallers! I'm setting up a drupal-powered site. I have some troubles and hope on your help.
My site has 5 sections. All pages have 'page' content type. The task is to have different design for every section. Just different color for sidebar and different picture, but...
Site structure is:
1. Home page (static html)
2. Section page (all related pages should be listed here)
3. Common page
I have searched drupal's forums, read 'handbook' and 'drupaldocs' to solve my problem. So I have one solution, but it seems too ugly to me. Main idea is to use taxonomy for this.
1. Make vocabulary 'Section'
2. Set terms '1', '2', ... to every node on site
3. Make menu and put links like 'taxonomy/term/10' on it (this will be my 'Section' pages)
Then I have to customize my theme to change its appearence depending on site 'section'. Its easy to do for 'common' page. I get node's term with taxonomy_node_get_terms($node->nid). Then I determine section to which my node is related.
But what should I do with 'section' pages? Get 'path' and decide, what 'section' is that?
What should I do with 'edit node' and 'comment on node' pages?
Please help me! I know there is a nice solution, but my stupid head can't see it. Thanks in advance!
Comments
Sections module
Check out the sections module, which might do what you're looking for without PHP voodoo. Basically it lets you theme different sections of the site based on URL paths.
(Username formerly my full name, Richard Eriksson.)
unfortunately it doesn't
It allows to theme site based on URL path, as you said. But, I can do it myself. I need a complex approach - 'sections module' can't help with 'reply' pages for example.
It can
The regular expresssion for reply is -from the top of my head and untested-
comment/reply/.*
Please test this and tell me if this silved your question. If not, post a feature requerst with sections.module.
---
Next time, please consider filing a support request.
[Bèr Kessels | Drupal services www.webschuur.com]
I don't need different
I don't need different design for 'reply'-pages!
All pages divided into few sections. I want all pages, related to one section, look the same. So, 'reply'-page design should depend on current section.
Sections module allows to have 'forum', 'book' or 'comment' pages look different. My task is to have different design to some group of pages.
What about yours reply
check it out
I don't know if this helps, but we just finished launching the new Music for America site that uses Drupal and Civic Space. We created this thing where there are 4 main splash pages that all have different layouys. . .although they do look sort of similar. I don't know if this addresses the issue of having the sidebars look different, but check it out. . . .
www.musicforamerica.org
Thanks for your response,
Thanks for your response, unluckily it doesn't help :(
A workaround
You could create a flexinode type for each "section" and then theme each one.
.:| Laura • pingV |:.
_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet
My task is to change theme
My task is to change appearence of whole site, not just a node. Can flexinode do this? I think not.
I found solution
My solution described here