help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Redirect event-url from module to menu

Redirect event-url from module to menu

7 years 10 months ago - 7 years 10 months ago
#23273
Hey,
I use on my website the mod_jem (Simple List) which I already have been changed with overrides.
As next, I have a main-menu with an entry called "events" where the eventlist is shown.

Now, when I click on an event in the modul, the url for the view of this event ist:
component/jem/event/<event-id>-<eventname>

In the eventlist, when I click on an event, the url looks like:
/sub-menu/events/event/<event-id><eventname>

So my questions is:
How can I change the link in the mod_jem that it redirects to the main menu's eventlist event?

Thank you!
Last edit: 7 years 10 months ago by Egnarts.

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

Re: Redirect event-url from module to menu

7 years 10 months ago
#23275
I solved that with a str_replace:
Code:
$eventLink = str_replace("component/jem", "sub-menu/events", $item->link);
After the foreach loop, and then replaced all $item->link with $eventLink.

This is a quick and dirty solution, is there a better way?

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

Time to create page: 0.376 seconds