Keyword

Item view options in category listings

  • poselziobro
  • poselziobro's Avatar Topic Author
  • Offline
  • New Member
More
1 month 2 weeks ago #173983 by poselziobro
poselziobro created the topic: Item view options in category listings
Is it possible to achieve such an effect?
In one category in Category item layout so that Leading count (e.g. 2 items) were visible entire articles (fulltext) and the other Primary count (e.g. 3 items) so that only intro text and image were visible?

As in the attachment
Attachments:

Please Log in or Create an account to join the conversation.

  • poselziobro
  • poselziobro's Avatar Topic Author
  • Offline
  • New Member
More
1 month 2 weeks ago - 1 month 2 weeks ago #173997 by poselziobro
poselziobro replied the topic: Item view options in category listings
More specifically.
The point is if you can set
fulltext (no word limit in introtext) for the Leading group
and
introtext (custom word limit) for the group Primary / Secondery


anyone?
Last edit: 1 month 2 weeks ago by poselziobro.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 1 week ago #174023 by Fotis
Fotis replied the topic: Item view options in category listings
1. Create a new set of K2 template overrides inside your Joomla template: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

2. Edit the file default/category_item.php, locate the line <?php echo $this->item->introtext; ?> and replace with <?php echo $this->item->text; ?>. Done.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 1 week ago #174024 by Fotis
Fotis replied the topic: Item view options in category listings
Actually, copy the file category_item.php to category_leading_item.php so you can only use it for your leading items. Then in category.php, replace the first instance of:

echo $this->loadTemplate('item');

with:

echo $this->loadTemplate('leading_item');

That should do the trick.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum