0

We have a language select page which the user gets presented with when they first enter the site, we want to redirect the user to the "/home" CMS page when they select a language.

I know that $_lang->getCurrentUrl(); redirects to the current URL, and $_lang->getHomeUrl(); redirects to the home page (which is currently this language select page) how can we get it to do the following $_lang->getPageUrl("home"); as this snippet doesn't do the job.

Cheers, C.

1 Answer 1

1

Try this one:

$_lang->getBaseUrl().'home';

If you want the secure url, you can get

$_lang->getBaseUrl('link', true).'home';

[UPDATE]
Or you can try this one:

$_lang->getUrl('', array('_direct'=>'home'))

This way you have the ___store param in GET and this ensures you get on the right website no mater how you configured your store urls.

1
  • Brilliant perfect solution with the update. Thank you Apr 11, 2013 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.