I want to share the output of the page into two parts:
In the first part - the text to the system-readmore.
In the second part - the text after the system-readmore.
Is there a ready-made components or solutions?
Or what would be the options. Can I parse the text before displaying on the availability of the separator?
Thanks in advance.
Example: https://dl.dropboxusercontent.com/u/51408060/Screen.jpg
joomla 3.0.2
k2 2.6.5
The easiest way could be using introtext and fulltext in K2.
Go to K2 > Parameters > Advanced > Use one editor window for introtext & fulltext ( YES ).
Make sure that introtext and fulltext are set to Show in the corresponding K2 category and/or item settings (Item view options in the right tabs).
Verify that your K2 template (if a custom one) is showing both parts:
This was taken from the original item.php K2 template.
<?php if(!empty($this->item->fulltext)): ?>
<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<div class="itemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemFullText')): ?>
<!-- Item fulltext -->
<div class="itemFullText">
<?php echo $this->item->fulltext; ?>
</div>
<?php endif; ?>
<?php else: ?>
<!-- Item text -->
<div class="itemFullText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.