1.0.1 • Published 5 years ago
aitomic-m-lang v1.0.1
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 => ''}