Keyword

ReadMore on Category Description

  • Zach Schnackel
  • Zach Schnackel's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #80156 by Zach Schnackel
ReadMore on Category Description was created by Zach Schnackel
Hi, I know this might be one of those "this is how K2 works" but we have built a site that really requires everything (except for blogs posts and moulding profiles) to be in Categories (not items). These categories have a lot of content (pictures/links, etc) based on our hierarchy (Products>Windows>Marvin.... etc). I saw there wasn't a readmore option available in the category description (to limit what is shown on the parent category) and when I try to insert the default Joomla! readmore --- hr id="system-readmore" ----, it does not work. Instead of trying to do a php string cut off function, is there another way to do this? I want the administrators to be able to cut off their content when they need to (what shows up in the parent category's content). Thanks!

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

  • Zach Schnackel
  • Zach Schnackel's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #80157 by Zach Schnackel
Replied by Zach Schnackel on topic ReadMore on Category Description
I was able to create a new K2 template and insert:

echo substr($subCategory->description, 0, 200) . '...'

where the description would go (inside the if statement which decides whether to even implement it) - but it'd be great if this was dependent more on the Joomla! readmore tag than the 200 limit I have now. Thanks!

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

  • Zach Schnackel
  • Zach Schnackel's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #80158 by Zach Schnackel
Replied by Zach Schnackel on topic ReadMore on Category Description
Any help with this guys?

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

More
13 years 10 months ago #80159 by coolweb
Replied by coolweb on topic ReadMore on Category Description
have you solved your problem?

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

More
13 years 7 months ago #80160 by Supriya
Replied by Supriya on topic ReadMore on Category Description
any updates? does the v2.4.1 resolve this?

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

More
13 years 5 months ago #80161 by Geoffrey Mack
Replied by Geoffrey Mack on topic ReadMore on Category Description
Same problem here. Can't figure out how to solve this one...

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

  • Voiceconnect Internet Solutions
  • Voiceconnect Internet Solutions's Avatar
  • Offline
  • Junior Member
More
10 years 7 months ago #80162 by Voiceconnect Internet Solutions
Replied by Voiceconnect Internet Solutions on topic Re: ReadMore on Category Description
dont know if this is solved but i have the same issue and i replaced

<?php echo $category->description; ?>

with

<?php echo K2HelperUtilities::wordLimit($category->description, 50); ?>

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


Powered by Kunena Forum