0

Thought a bit more how people use Drupal CMS to update categories. Categories will be taxonomies in a view so that they can refer nodes to the categories.

Also at the most when click on category, it will be either a full taxonomy page or node page.

Sidebar will have taxonomy categories on left column and right column will explain more information. So if it is on same taxonomy, the menu item will be highlighted to let user know where they are on.

The problem is how to add sidebar to either taxonomy page or node page and set menu item active / highlighted?

1 Answer 1

1

Normally I'd advocate writing it yourself, but in this case there are modules that do exactly what you want.

Create a block for the taxonomy you want to display and only display it on certain URL's (I'd use the path alias module to create a specific URL for relevant content e.g. '/CONTENT_TYPE/CONTENT_TITLEand test for/CONTENT_TYPE/*` on the block admin page)

https://www.drupal.org/project/taxonomy_block

You can use the Menu Trail By Path module to indicate what the active trail should be in the menu.

5
  • by writing it myself, so you are saying it is okay to add in sidebar menu in the taxonomy template?
    – joe
    Commented Mar 23, 2015 at 13:06
  • I wouldn't do it that way, you could but it seems restrictive. I'd write a module, check the arguments passed to the page and provide a block and place that in the sidebar region. Which is what led me to the taxonomy block module as it already does that.
    – bloke_zero
    Commented Mar 23, 2015 at 14:43
  • sorry to uncheck answer. Because I tried taxonomy block it gave me error related to sql. Not sure why. Is there another better module similar to this module?
    – joe
    Commented Mar 23, 2015 at 15:31
  • Maybe try drupal.org/project/taxonomy_menu_block - its a little more complicated than the other one but might give better results.
    – bloke_zero
    Commented Mar 23, 2015 at 15:41
  • thanks. i try this module first. also i had difficulties to add menu block to taxonomy/title page using display suite :(
    – joe
    Commented Mar 23, 2015 at 15:57

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.