I have a blueprint where my client can add pages to the footer (see blueprint). Unfortunately I do not know how to add a multilingual link. This code does not add the /en
part: <?= str::slug($item) ?>
Any idea?
Blueprint:
subpages:
label:
en: Show page on footer
de: Seite im Footer anzeigen
type: checkboxes
default: false
options: query
columns: 3
query:
page: /
fetch: invisibleChildren
value: '{{title}}'
text: '{{title}}'
flip: true
Snippet:
<?php foreach($site->subpages()->split() as $item): ?>
<li class="menu__item<?php if($item == $page->title()): ?> is-active<?php endif ?>">
<a href="<?= str::slug($item) ?>" class="menu__link menu__link--small"><?= html($item) ?></a>
</li>
<?php endforeach ?>