event > resources : enable external and internal link. #8
This commit is contained in:
parent
d250164915
commit
68bb8a75f9
2 changed files with 15 additions and 4 deletions
|
|
@ -149,7 +149,13 @@
|
|||
<div class="collapsable__item--padding grid">
|
||||
<?php foreach($page->resources()->toStructure() as $resource): ?>
|
||||
<div class="resource grid__item" style="--span: 4;">
|
||||
<p><?= $resource->name() ?></p><a href="<?= $resource->file()->toFile()->url() ?>" title="Télécharger le fichier" download>télécharger ↓</a>
|
||||
<?php if ($resource->link()->isNotEmpty()): ?>
|
||||
<?php if ($resource->link()->toFile()): ?>
|
||||
<p><?= $resource->name() ?></p><a href="<?= $resource->link()->toUrl() ?>" title="Télécharger le fichier" download>télécharger ↓</a>
|
||||
<?php else: ?>
|
||||
<?php snippet('a', ['url' => $resource->link()->toUrl(), 'text' => $resource->name() . ' →']) ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue