Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top