Hi, I’m trying to builit a simple structured articles and so far I have in the blueprint:
press:
label: Press
fields:
press:
label: On en parle
type: structure
columns:
press_title: true
press-published: true
files: true
fields:
press_title:
label: Titre
type: text
width: 1/4
press-published:
label: date de publication
type: date
width: 1/4
files:
label: files
type: files
width: 1/2
- I trying to query only file type ‘documents’ and ‘audio’. I’ve tried
query: page.documents
But how do I add ‘audio’ as well in the query range?
and in the template:
<bside class="press">
<h2 class="h1">On en parle</h2>
<div>
<section class="column text">
<ul>
<?php foreach ($page->press()->toStructure() as $press): ?>
<li><?= html::a($press->url(), $press->press_title()) ?></li>
<?php endforeach ?>
</ul>
</section>
</div>
</bside>
- it works in my layout but I can’t parse the files URL. The result is the homepage??? instead of the files path of the files included in the structured field.
Many thanks for any help.
N