Trying to loop through the two languages I have on the site to create hreflang tags for english and german.
<?php foreach($kirby->languages() as $language): ?>
<link
rel="alternate"
hreflang="<?php echo strtolower(html($language->locale(LC_ALL))); ?>"
href="<?= $page->url($language->code()); ?>" />
<?php endforeach ?>
As soon as I remove the href $page object it shows both as it should. If I include it (to get the relevant url) and try to load the german version of any page at /de it only shows the german hreflang and not the english one too. Any ideas?