Ich habe meine Idee von eben mal ausprobiert und es funktioniert.
Ob angemeldet oder nicht, beide sehen die gleiche Liste, aber der Nichtangemeldete kann nicht downloaden und erhält statt dessen einen Hinweis.
Hier meine geänderte ce_downloads.html5
PHP-Code:
<?php $this->extend('block_searchable'); ?>
<?php $this->block('content'); ?>
<?php if (FE_USER_LOGGED_IN): ?>
<ul>
<?php foreach ($this->files as $file): ?>
<li><?= Image::getHtml($file['icon'], '', 'class="mime_icon"') ?> <a href="<?= $file['href'] ?>" title="<?= $file['title'] ?>"><?= $file['link'] ?> <span class="size">(<?= $file['filesize'] ?>)</span></a></li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<ul>
<?php foreach ($this->files as $file): ?>
<li><?= Image::getHtml($file['icon'], '', 'class="mime_icon"') ?> <a href="#" onClick="alert('bitte einloggen zum Download')" title="bitte einloggen zum Download"><?= $file['link'] ?> <span class="size">(<?= $file['filesize'] ?>)</span></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php $this->endblock(); ?>
Lesezeichen