Hey there.
I’m working on a multi language install and have a question about the select field.
Currently running this code, to relate a page to a specific project.
project:
label: Select Project
type: select
options: query
query:
fetch: pages
template: project
value: '{{url}}'
required: true
When I run
<?php foreach($page->children()->flip()->visible() as $item): ?>
<div>
<?= $item->project()->html() ?>
</div>
<?php endforeach ?>
I’m getting the URL of the selected project, but always in the default language.
mydomain.com/projects/project-title/
What would be the way to get the url based on the current selected language, so it becomes:
mydomain.com/de/projects/project-title/
mydomain.com/fr/projects/project-title/
Thanks in advance