Jump to content

[solved] Other languages index incorrect url


Recommended Posts

<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages_block_top">
	<div id="leo-button2"><a class="leo-mobile">{l s='Languages'  mod='blocklanguages'}</a></div>
	<div id="countries">
	{* @todo fix display current languages, removing the first foreach loop *}
{foreach from=$languages key=k item=language name="languages"}
	{if $language.iso_code == $lang_iso}
		<div class="selected_language item-top"></div>
	{/if}
{/foreach}
		<div class="nav-item-content">
			<ul id="first-languages" class="countries_ul">
			{foreach from=$languages key=k item=language name="languages"}
				<li class="nav-item {if $language.iso_code == $lang_iso}selected_language{/if}">
				{if $language.iso_code != $lang_iso}
					{assign var=indice_lang value=$language.id_lang}
					{if isset($lang_rewrite_urls.$indice_lang)}
						<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">
					{else}
						<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">

					{/if}
				{/if}
						
						<span class="ptx_language">{$language.name}</span>
				{if $language.iso_code != $lang_iso}
					</a>
				{/if}
				</li>
			{/foreach}
			</ul>
		</div>	
	</div>
</div>
{/if}
<!-- /Block languages module -->

I think it might have something to do with the language block. This is the code from the tpl in the theme for that module. Anybody have an idea what code is causing  this to happen?

Link to comment
Share on other sites

I think that just fixed it! I will test it a bit more before marking it as solved! I owe you a cup of coffee! If you send me your paypal email I will send you a thank you!

 

helping is sufficient payment. Though I am a big fan of the 'turtle sugar free latte served near me' I will mark this as closed.  I also think this will fix this post

 

http://www.prestashop.com/forums/topic/290173-long-list-of-404-errors-after-adding-language/?do=findComment&comment=1462750

 

if so please tell us so in that post, and I can mark as solved.

 

happy prestashopping

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...