Looks like Saturdays and Sundays are the perfect time to spot problems in my Kirby sites
I have structured field in my home.yml blueprint in which I have a select field that pulls all the pages with a project template.
Looks like this
slideproject:
label : Projects
type : select
options: query
query :
fetch : pages
template : project
The select works as expected and I can sepickect the projects I need to display without troubles.
Now in my home.php template I do the following:
<?php
if ($slides = $page->slides()->toStructure()) :
foreach ($slides as $slide) :
$project = $slide->slideProject();
endforeach
endif;
?>
Up until this point everything works correctly and I get the correct uri if I try to echo the $project variable.
My problem is, no matter what I do, I canβt get the page object using the uri
None of these work
page($project)->title();
$project->toPage()->title();
The only option that seems to work is
$site->index()->findBy('uid' , $project)->title()
Is this normal or am I missing something?
The site is multilang.