Question

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

Was it helpful?

Solution

The easiest way could be using introtext and fulltext in K2.

  1. Go to K2 > Parameters > Advanced > Use one editor window for introtext & fulltext (YES).

  2. 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).

  3. 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; ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top