Hi everyone, this is probably simple but I read the docs, tried multiple things and went through old forum posts - until now without luck and I don’t quite know how to address the issue. I am hoping that you can point me in a direction to fix my error.
I have a structured field I within my site blueprint with which I select internal pages to be shown in the footer. This is what it looks like:
internalLinks: label: Internal Links help: Select internal pages to be shown in footer type: structure fields: title: label: Page Title type: text url: label: Internal page type: pages multiple: false subpages: true
Within my footer snippet I have following foreach loop:
<ul> <?php foreach ($site->internalLinks()->toStructure() as $intLink) : ?> <li> <a href="<?= $intLink->url()->toPages() ?>"> <span><?= $intLink->title() ?></span> </a> </li> <?php endforeach ?> </ul>
Basically everything works as expected. I noticed though that when I am viewing an individual note (I am using the starterkit to base my stuff of) “/notes/” is getting added to the url and thus leading to a not found error.
Why is this happening?