Why this code doesn’t work
<?php foreach ($page->Containerb()->toFile() as $imgB) : ?>
<a href="<?= $imgB->url() ?>" data-fancybox="container-B"> </a>
<?php endforeach ?>
Containerb contains this:
----
- file://EtfNtPnmsVvuBzOs
- file://YTMtpSGNvXODy1xl
- file://4nGDM3MVEYvJeP4e
----
It gets this error: call to a member function url() on null
And this code is already working
<img src="<?= $page->Containerb()->toFile()->url() ?>">.