aitomic-m-lang
v2.0.0
Published
A template of language switcher. Import {latte} block in '@layout.default.latte' using macro `{import '../path-to-latte-template'}` and declare this block as `{include #m-lang}`. Between macros `{import}` and `{include}` redefine template of used blocks
Downloads
188
Readme
A template of language switcher. Import {latte} block in '@layout.default.latte' using macro {import '../path-to-latte-template'}
and declare this block as {include #m-lang}
. Between macros {import}
and {include}
redefine template of used blocks like this:
{block #itemName}
<span class="m-lang__name">{$mutation->name}</span>
{/block}
{block #control}
<label for="language-status" class="m-lang__link m-lang__control">
{include #itemName, mutation => $lang}
</label>
{/block}
Take a look at source of {latte} template to discover available hooks to customization.
Optionally set variables for CSS classes of list, item and link:
{include #m-lang, componentClass => '', itemClass => '', linkClass => ''}