- Posts: 2
COMMUNITY FORUM
Attachments Pagebreak
- Daniel Diaz
- Topic Author
- Offline
- New Member
Less
More
7 years 9 months ago #159867
by Daniel Diaz
Attachments Pagebreak was created by Daniel Diaz
I need to add a button to do page break in attachments, the list of files is long and I would like to be able to separate it in some way.
I tried to modify the itemform.php file, but I could not do it.
Thanx in advanced.
I tried to modify the itemform.php file, but I could not do it.
Thanx in advanced.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 8 months ago #159889
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Attachments Pagebreak
Hello Daniel,
This would have to be a custom implementation, quite possibly a height toggler.
This would have to be a custom implementation, quite possibly a height toggler.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Daniel Diaz
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
7 years 8 months ago #159903
by Daniel Diaz
Replied by Daniel Diaz on topic Attachments Pagebreak
Hello Krikor, I already implemented that option:
<div id="heighttoogler">
<script>
jQuery(document).ready(function($)
{
$("#author_bio_wrap_toggle").click(function()
{
$("#author_bio_wrap").slideToggle( "slow");
if ($("#author_bio_wrap_toggle").text() == "Download")
{
$("#author_bio_wrap_toggle").html("Download")
}
else
{
$("#author_bio_wrap_toggle").text("Download")
}
});
});
</script>
<?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?>
<?php $user = &JFactory::getUser(); if ($user->guest): ?>
<?php endif; ?>
<?php $user = &JFactory::getUser(); if (!$user->guest): ?>
<div class="author_bio_toggle_wrapper">
<a href="#0" id="author_bio_wrap_toggle">Download Files</a>
</div>
<div id="author_bio_wrap" style="display: none;">
<div class="itemAttachmentsBlock">
<ul class="itemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo 'descargas/' .$attachment->filename; ?>" target="_blank"><?php echo $attachment->title; ?></a>
<?php if($this->item->params->get('itemAttachmentsCounter')): ?>
<div class="vcsd">(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div></div>
<?php endif; ?>
<?php endif; ?>
</div>
But the list of files is very long,
The idea would be to add a new button in add attachments, I've tried it in several ways, logically I do not understand almost anything about php.
I attach an image of example.
imgur.com/a/4GeAV
Thanx again.
<div id="heighttoogler">
<script>
jQuery(document).ready(function($)
{
$("#author_bio_wrap_toggle").click(function()
{
$("#author_bio_wrap").slideToggle( "slow");
if ($("#author_bio_wrap_toggle").text() == "Download")
{
$("#author_bio_wrap_toggle").html("Download")
}
else
{
$("#author_bio_wrap_toggle").text("Download")
}
});
});
</script>
<?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?>
<?php $user = &JFactory::getUser(); if ($user->guest): ?>
<?php endif; ?>
<?php $user = &JFactory::getUser(); if (!$user->guest): ?>
<div class="author_bio_toggle_wrapper">
<a href="#0" id="author_bio_wrap_toggle">Download Files</a>
</div>
<div id="author_bio_wrap" style="display: none;">
<div class="itemAttachmentsBlock">
<ul class="itemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo 'descargas/' .$attachment->filename; ?>" target="_blank"><?php echo $attachment->title; ?></a>
<?php if($this->item->params->get('itemAttachmentsCounter')): ?>
<div class="vcsd">(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div></div>
<?php endif; ?>
<?php endif; ?>
</div>
But the list of files is very long,
The idea would be to add a new button in add attachments, I've tried it in several ways, logically I do not understand almost anything about php.
I attach an image of example.
imgur.com/a/4GeAV
Thanx again.
Please Log in or Create an account to join the conversation.