Jump to content

hide cms pages from menu, based on cms page category and usergroup


Recommended Posts

hi!

 

since few hours I'm struggling with the case mentioned in topic - long story short:

i've got two groups of clients, let's call them: "normal" and "pro".

I've got two categories of cms pages: "for normal" and "for pro".

I've also got horizontal menu [it's the default module], which contains links to pages from both categories.

and now the fun begins  ;)

 

I've found a way [many different, TBH, and I assume, that I understand them all ;)] to prevent displaying this or that cms page, based on user logged in, so I know how to read users' group id.

I want to filter out cms-categories in the menu, so:

1. when no user is logged in - menu is built from "default" cms-category

2. when a member of "normal" group is logged in - menu is built from "default" and "for normal" category

3. when a member of "pro" group is logged in - menu is built from "default" and "for pro" category

 

something tells me, that "all I need to do" is set up conditions in

\themes\<my-theme>\modules\blocktopmenu\blocktopmenu.tpl

but I have no idea, how to get category_id of the cms page [and ONLY the cms page, I don't want to block shop categories this way]. if some core files needs improvement to do that - method that uses override folder would be great..

 

PrestaShop version 1.6.0.9

 

any ideas? :/

Edited by peejay (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...