How to change the Routing

More
12 years 1 month ago #29944 by igcorreia
Hello I want to change the SLUG of the menu item actived based on the user profile.

so if user->gid is AUTHOR then the menu active should be the AUTORS PAGE instead the usual LATEST NEWS.

So based of the user permissions in the category_items I want to change the slug of the item, but I dont know how to work with this:
Code:
JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug)

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29945 by igcorreia
Replied by igcorreia on topic How to change the Routing
I am only missing this to finish a project, anyone knows?

I have study the entire array on the $item and $category slug but I can't see where I can change which menu will be active :/

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29947 by ggppdk
Replied by ggppdk on topic How to change the Routing
This is the "signature" of the function:

getItemRoute($id, $catid = 0, $Itemid = 0);


-- the function will decide which menu to activate only if you do not suggest one

thus if you know which Joomla menu item to activate you can pass it as a 3rd parameter,

note that it must be a FLEXIcontent menu item otherwise it will break SEF routing

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29963 by igcorreia
Replied by igcorreia on topic How to change the Routing
Baaaaaaaa :/ I just change the $categoryslug and the routing pointed them to the desire menu, but this is not the right way of doing it but is working.

Thanks.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29964 by igcorreia
Replied by igcorreia on topic How to change the Routing
I know the menu item, can you give an example? I have never done this please.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29966 by ggppdk
Replied by ggppdk on topic How to change the Routing
First what are the menu item you want to use (type is category, directory view other) ?

what is their relation to current item? (what is their relation to the item id, e.g. is the menu item you want to use a category of the item? how can we decide select this category?)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.312 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline