I have been struggling with this for too long now, so pardon me but i bet you can help me easily.
I have a page “investor-relations/fika” with a custom block of the type “financial calendar”. In that block there is a structured field called “items”. I want to make a collection of that data so that i can use it in other places on the site.
What i tried is:
$fika = $site->find('investor-relations/fika')->blocks()->toBlocks()->filterBy('type', 'financial-calendar')->first()->items()->toStructure();
$fika = $site->find('investor-relations/fika')->blocks()->toBlocks()->findBy('sid', 'fika')->items()->toStructure();
But they end in “NULL” , what am i doing wrong?
It’s the only block of that type on the page and it has a field “sid” with the value “fika”.
Any hints?