Page 1 of 1

Categorize Content Pages?

Posted: Tue Mar 24, 2015 10:00 pm
by aliciafay
Hey all,

I'm hoping someone has an easy solution or a module to do something like this... or maybe I'm doing it wrong?

When editting a content page, we'd like to be able to say "This content is in category A." Then on other pages, we'd like to have the menu manager create menus of content inside category A, or Category B, or whatever. Is there an easy way to do this?

Am I missing something?

Re: Categorize Content Pages?

Posted: Wed Mar 25, 2015 6:08 pm
by Dr.CSS
That sounds more like a module as 'pages' don't have categories they use the use their position in Content > Pages to create their place in the menu...

Re: Categorize Content Pages?

Posted: Thu Mar 26, 2015 7:03 am
by staartmees
You can achieve this very simple with the menumanager by using the 'start_level'

Re: Categorize Content Pages?

Posted: Fri Mar 27, 2015 3:24 pm
by rotezecke
if the pages are not ordered by your categories you could use one of the three extra fields to set the category.
i believe the extra fields are available unless you call the menu with loadprops="0".
$node->extra1 -- This field contains the value of the extra1 page property, unless the loadprops-parameter is set to NOT load the properties.
in a template / page you can access the extra value like this:

Code: Select all

{page_attr key='extra1' assign='extra1'}
now I'm guessing but I believe if that variable {$extra1} is defined before you call the menu, you could have something like {if $extra1 -eq $node->extra1} inside your menu template to filter the pages you want.