K2 items doen´t show attachements
Creative, responsive and unique Joomla template to create personal portfolio website with amazing animations and clean design.
Rate this topic: 1.00 out of 6 based on 1 vote(s)
- GK User
- Sat Mar 19, 2016 12:15 pm
- Reply with quote
- Report this post
(Excuse my english)
I am adding some pdfs with the attachements option in k2 but when I check the item in the browser they are not there, do I have to do something to show them?
I am adding some pdfs with the attachements option in k2 but when I check the item in the browser they are not there, do I have to do something to show them?
-
- Fresh Boarder
- teitbite
- Wed Mar 23, 2016 1:34 pm
- Reply with quote
- Report this post
Hi
Please edit /html/com_k2/templates/default/item.php and add this code to where You wish attached files should be displayed.
Please edit /html/com_k2/templates/default/item.php and add this code to where You wish attached files should be displayed.
- Code: Select all
<?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?>
<!-- Item attachments -->
<div class="itemAttachmentsBlock">
<span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span>
<ul class="itemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a>
<?php if($this->item->params->get('itemAttachmentsCounter')): ?>
<span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<div class="clr"></div>
-
- Moderator
2 posts
• Page 1 of 1