I have the following structure of the site that is revealed in main menu hierarchy:

  • News
    • news category 1
    • news category 2
  • Documents
    • document category 1
    • document category 2

All the pages mostly will be presented with a single Content Type. But for different places in menu hierarchy page regions should consist of different blocks.

e.g., for a node from "news category 1" there will be a search block placed in the sidebar, for th enode from "document category 2" -- the login block.

I see a quite moot "solution" for this. I will have to turn nodes' urls into somewhat like "mysite.org/news/category1/..." and set visibility options to blocks through url patterns. Is it a right way to follow? But in this case the editor (not me) will have to invent and handcode url aliases when creating node and it seems to me very unreliable to entrust him with the site structure.

Another way -- create different content types for every categories and generate aliases automatically but it seems to me a bit crazy.

What do you think about that?

  • If I'm understanding your question correctly, you'd like the editor to be able to add categories to the site and have them choose which blocks are shown for each category?
    – splatio
    Aug 14, 2012 at 10:54
  • Exactly. Categories list is a certain and defined set and won't change. It'll be a menu hierarchy and editors will have to add node to one o another category. And nodes pages should have region stuffing appropriate to the category.
    – DimG
    Aug 14, 2012 at 12:14

1 Answer 1


If your categories are pre-defined and won't change then I think your solution of using blocks regions and block visibility settings may be the best. If you need more complex visibility settings the Context module should be able to help.

  • Well, then the editor should write aliases every time the node is created?
    – DimG
    Aug 14, 2012 at 13:09
  • If your URL structure was news/cat1/nodetitle then you could set the block visibility to only show certain blocks at the paths news/cat1/* (using * as a wildcard). When a new node was added to that category (and its URL was news/cat1/nodetitle) the same blocks would show. You would only have to set this up per category, rather than per node.
    – splatio
    Aug 14, 2012 at 13:14
  • Well, maybe I've expressed badly but the problem for me is creating that news/cat1/nodetitle-like URL. Is this an editor's duty to enter aliases in?
    – DimG
    Aug 14, 2012 at 14:33
  • Pathauto is the module you are looking for in that case. You can set up patterns at Admin > Configuration > URL Aliases that set how the automatic URLs will be filled.
    – splatio
    Aug 15, 2012 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.