Skip to content

Instantly share code, notes, and snippets.

@kermie
Last active August 29, 2015 14:11
Show Gist options
  • Save kermie/89eaeaa58062dc51db3b to your computer and use it in GitHub Desktop.
Save kermie/89eaeaa58062dc51db3b to your computer and use it in GitHub Desktop.
Changed languages.tpl (OXID eShop) for displaying language names instead of flags
[{oxscript include="js/widgets/oxflyoutbox.js" priority=10 }]
[{oxscript add="$( '#languageTrigger' ).oxFlyOutBox();"}]
[{if $oView->isLanguageLoaded()}]
<div class="topPopList">
[{capture name="languageList"}]
[{foreach from=$oxcmp_lang item=_lng}]
[{assign var="sLangImg" value="lang/"|cat:$_lng->abbr|cat:".png"}]
[{if $_lng->selected}]
[{capture name="languageSelected"}]
<a style="width:auto;" title="[{$_lng->name}]" href="[{$_lng->link|oxaddparams:$oView->getDynUrlParams()}]" hreflang="[{$_lng->abbr }]">[{$_lng->name}]</a>
[{/capture}]
[{/if}]
<li><a style="width:auto;" class="[{if $_lng->selected}]selected[{/if}]" title="[{$_lng->name}]" href="[{$_lng->link|oxaddparams:$oView->getDynUrlParams()}]" hreflang="[{$_lng->abbr }]">[{$_lng->name}]</a></li>
[{/foreach}]
[{/capture}]
<p id="languageTrigger" class="selectedValue">
[{$smarty.capture.languageSelected}]
</p>
<div class="flyoutBox">
<ul id="languages" class="corners">
<li class="active">[{$smarty.capture.languageSelected}]</li>
[{$smarty.capture.languageList}]
</ul>
</div>
</div>
[{/if}]
[{oxscript widget=$oView->getClassName()}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment