I have a question about the Object field.
I was under the assumption that if an Object field has no data object created in the panel, then the below “if statement” would fail. Is that correct? In my case it passes and prints “PASS”.
<?php if ($catalogue = $page->catalogue()->toObject()): ?>
PASS
<a href="<?= $file->url() ?>">Download Catalogue</a>
<?php endif ?>
catalogue:
type: object
fields:
pdf:
type: files
max: 1
Thank you!