Category and sub categories

alt=
adanhash
@famegroup
8 years ago
15 posts
Hi, can somebody recommend the best way in doing this. basically i want to show the parent cateogry and sub catergories in the menu section in the profile.

So for example if a user used jrPage and he created a category name called about me and then he created 5 different pages in the "about me" category and 3 other pages in another category called "Contacts" the menu will list all the categorys and pages linked to that category

About Me Contact
Pagename1 otherPagenamexx
PAgename2 otherpagename2xx
page3 otherpagexx
updated by @famegroup: 05/02/16 06:05:23PM
michael
@michael
8 years ago
7,750 posts
The 'best' way will depend on your skills and what you are most comfortable doing. It could be done just in the templates, but I would think the correct way would be to build a module because the info you are after will not be there yet in the menu section.

The menu section of any page does not have all of the information there for all other pages, so while you are on, say, the audio profile page, you want that page to also contain all of the list of pages that that profile has.

That information is going to need to be retrieved and injected into the menu system for the profile. It could be done with a {jrCore_list} call via the templates

Docs: "{jrCore_list}"
https://www.jamroom.net/the-jamroom-network/documentation/development/89/jrcore-list

but would probably be better done with a module and the Events and Listeners system

Docs: "Events and Listeners"
https://www.jamroom.net/the-jamroom-network/documentation/development/1011/events-and-listeners

To listen for the menu being created, then do a search for the current profiles pages, and inject them into the menu templates so the info your after is there.

Once the info is there, then you can style it into a drop down menu in any way you require.

Tags