Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Recipe for URL redirect depending on...
Recipe for URL redirect depending on language
Recipe for URL redirect depending on language
The main language of the site is English, latest version of MetaMod, Joomla 1.5 and latest version of Joomfish. One of the menu items redirects to an external link and is obviously the the menu type "external link". So what I am trying to do is when either the browser language is another language other than English, or if the user select another language (using Joomfish on the front-end), for example French, is to have the external link redirect to another URL. I have tried to use existing recipes with a bit of modification but can't seem to get it working. Any help would be appreciated!
Thanks.
Re: Recipe for URL redirect depending on language
Hi Wrogo,
unfortunately there's no standard way to change the exact contents of a menu item from inside MetaMod, at the point of display.
However JoomFish allows you to "translate" external links and provide an alternative. That would at least cover the case where JoomFish is displaying the rest of the page in French; the link would follow suit. So you can use a different link for each language.
If you want to show that alternative link based on the browser language irrespective of what JoomFish is doing, then you have to do some work-arounds. i.e. you could provide a different menu module that includes the different link in it. If you are currently using a standard mod_mainmenu module, then you can replace that with a module on this site called ElastiMenu. Elastimenu allows you to selectively hide menu items in a menu. So you would create your menu with both links in it as separate menu items, then use 2 ElastiMenu modules, one which hides one of them, and the other hides the other one. Then use MetaMod to switch between the two.
But I think that JoomFish is the best approach.
Cheers,
Stephen
Re: Recipe for URL redirect depending on language
Hi Stephen,
Many thanks for taking the time to write such a detailed reply - much appreciated! I must admit I have not looked at Joomfish close enough and so did not realise I could do a URL redirect with it. I have now done so and it has proven to be a neat solution, many thanks for pointing this out to me!
- Index
- » MetaMod
- » MetaMod General Support
- » Recipe for URL redirect depending on...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 1
- User Info:
- Total Users:
- 7671
- Newest User:
- kiresidencescondo2
- Members Online:
- 1
- Guests Online:
- 153
- Online:
- eugene4916
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked