Keyword

[SOLVED] Multiple categories menu text limit

  • siamnaulak
  • siamnaulak's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 2 months ago #145940 by siamnaulak
Multiple categories menu text limit was created by siamnaulak
Hi, I desperately need help on this please.

I create K2 Categories Menu with multiple categories and make to display 10 items in each page, and all is correct. Now I want to show intro text of 50 words for each items with read more. To do this I go to Components > K2 > Parameters > Content and write 50 at 'Item Introtext word limit' and Hide '
Item Fulltext'. But my my blog layout is still showing full text instead of intro 50 words.

Can any one please tell me how to fix?

http://i.imgur.com/NdkDyzK.jpg?1

http://i.imgur.com/DhjNvq9.jpg?1

http://i.imgur.com/E3iD0T4.jpg?1

Thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #145952 by Krikor Boghossian
Replied by Krikor Boghossian on topic Multiple categories menu text limit

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • siamnaulak
  • siamnaulak's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 2 months ago - 9 years 2 months ago #146062 by siamnaulak
Replied by siamnaulak on topic Multiple categories menu text limit
Hi Krikor, it works, thank you so much...

Let me explain what I did so that it may benefit someone like me :)

I go to components/com_k2/templates/default/category_item.php and edit 'category_item.php' file

LINE 129

Before
<!-- Item introtext -->
	  <div class="catItemIntroText">
	  	<?php echo $this->item->introtext; ?> 
	  </div>

After
<!-- Item introtext -->
	  <div class="catItemIntroText">
	  	<?php // echo $this->item->introtext; ?> 
                <?php echo K2HelperUtilities::wordLimit($this->item->introtext, 50); ?>
	  </div>
Last edit: 9 years 2 months ago by siamnaulak.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #146070 by Krikor Boghossian
Replied by Krikor Boghossian on topic Multiple categories menu text limit
Thank you for coming back :)
You should however override this file instead of directly edit it.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Franz Wohlkönig
  • Franz Wohlkönig's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #146079 by Franz Wohlkönig
Replied by Franz Wohlkönig on topic Multiple categories menu text limit
@siamnaulak: Thanks, works like i looked long for it:)

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


Powered by Kunena Forum