- Posts: 40
COMMUNITY FORUM
[SOLVED] Multiple categories menu text limit
- siamnaulak
-
Topic Author
- Offline
- Senior Member
Less
More
9 years 9 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
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 9 months ago #145952
by Krikor Boghossian
Replied by Krikor Boghossian on topic Multiple categories menu text limit
Please Log in or Create an account to join the conversation.
- siamnaulak
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 40
9 years 9 months ago - 9 years 9 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
After
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 9 months ago by siamnaulak.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 9 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
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
Please Log in or Create an account to join the conversation.
- Franz Wohlkönig
-
- Offline
- Platinum Member
Less
More
- Posts: 529
9 years 9 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.