Skip to content

Commit

Permalink
Pass the mime type to the download element links (see #604)
Browse files Browse the repository at this point in the history
Description
-----------

It's a completely optional attribute but we allow e.g. search engines to not follow these links if they don't want to (e.g. if they do not support indexing pdf files etc.) as they can check the content type.

Commits
-------

715e0b7 Pass the mime type to the download element links
  • Loading branch information
Toflar authored and leofeyer committed Oct 7, 2019
1 parent 8c52829 commit 621fd4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -3,7 +3,7 @@
<?php $this->block('content'); ?>

<p class="download-element ext-<?= $this->extension ?>">
<a href="<?= $this->href ?>" title="<?= $this->title ?>"><?= $this->link ?> <span class="size">(<?= $this->filesize ?>)</span></a>
<a href="<?= $this->href ?>" title="<?= $this->title ?>" type="<?= $this->mime ?>"><?= $this->link ?> <span class="size">(<?= $this->filesize ?>)</span></a>
</p>

<?php $this->endblock(); ?>
Expand Up @@ -5,7 +5,7 @@
<ul>
<?php foreach ($this->files as $file): ?>
<li class="download-element ext-<?= $file['extension'] ?>">
<a href="<?= $file['href'] ?>" title="<?= $file['title'] ?>"><?= $file['link'] ?> <span class="size">(<?= $file['filesize'] ?>)</span></a>
<a href="<?= $file['href'] ?>" title="<?= $file['title'] ?>" type="<?= $file['mime'] ?>"><?= $file['link'] ?> <span class="size">(<?= $file['filesize'] ?>)</span></a>
</li>
<?php endforeach; ?>
</ul>
Expand Down

0 comments on commit 621fd4e

Please sign in to comment.