- Posts: 18
COMMUNITY FORUM
IMPORTANT MESSAGE REGARDING CODE BLOCKS IN THE FORUM
The use of formatted code blocks has been restored in our (Kunena powered) forum for old and new threads.
Any code should (again) be placed within [code]...[/code] tags in the message editor.
[SOLVED] Can we have "Introtext word limit"
- Joseph
-
Topic Author
- Offline
- New Member
Less
More
9 years 7 months ago - 9 years 7 months ago #104700
by Joseph
[SOLVED] Can we have "Introtext word limit" was created by Joseph
In the K2 Parameters, Content Tab has a field to enter "Item Introtext word limit". Can we also have "Item Introtext word limit on Layout & view options for user (author) pages, Layout & view options for tag listings, Layout & view options for Search & Date listings as well please?
Regards,
Joseph
Regards,
Joseph
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
9 years 7 months ago #104701
by Lefteris
IMPORTANT: Please search the forum before posting a question!
JoomlaWorks Support Team Member
---
JoomlaWorks
www.joomlaworks.net/
Replied by Lefteris on topic Re: Can we have "Introtext word limit"
Hi. Thanks for your recommendations. You can also implement this by your own by placing a piece of code like the follwoing in your overrides:
<?php echo K2HelperUtilities::wordLimit($YOUR_VARIABLE, 100); ?>
IMPORTANT: Please search the forum before posting a question!
JoomlaWorks Support Team Member
---
JoomlaWorks
www.joomlaworks.net/
Please Log in or Create an account to join the conversation.
- Joseph
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 18
9 years 7 months ago #104702
by Joseph
Replied by Joseph on topic Re: Can we have "Introtext word limit"
Hi...
Thanks a lot for your reply, but could you please tell me where do I exactly put that code?
Thanks a lot for your reply, but could you please tell me where do I exactly put that code?
Please Log in or Create an account to join the conversation.
- Phil G
-
- Offline
- New Member
9 years 6 months ago - 9 years 6 months ago #104703
by Phil G
Replied by Phil G on topic Re: Can we have "Introtext word limit"
I need to do the same for my menu items containing
K2 » Latest items from (one or more) users or categories.
Also I've noticed that if I have a K2 Categories menu with multiple categories it suffers from the same problem :(
Currently they're both ignoring the Introtext word limit I've imposed on my master category.
K2 » Latest items from (one or more) users or categories.
Also I've noticed that if I have a K2 Categories menu with multiple categories it suffers from the same problem :(
Currently they're both ignoring the Introtext word limit I've imposed on my master category.
Please Log in or Create an account to join the conversation.
- Phil G
-
- Offline
- New Member
9 years 6 months ago #104704
by Phil G
Replied by Phil G on topic Re: Can we have "Introtext word limit"
Take a look at this thread : getk2.org/community/New-to-K2-Ask-here-first/152649-How-Fix---Introtext---Word-limit-for-multiple-categories
and also this article on templating:
getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates
I suggest you create a personal template which you can modify and test without messing up the default templates.
That's what I'm currently doing, will report back once I've got it working :)
and also this article on templating:
getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates
I suggest you create a personal template which you can modify and test without messing up the default templates.
That's what I'm currently doing, will report back once I've got it working :)
Please Log in or Create an account to join the conversation.
- Phil G
-
- Offline
- New Member
9 years 6 months ago #104705
by Phil G
Replied by Phil G on topic SOLVED Re: Can we have "Introtext word limit"
I solved my problem by:
- copying the the K2 templates folder to my Joomla folder: templates/myJoomlaTemplate/html/com_k2/
- Copying the default folder (I called mine blog)
- I then edited the category_item.php file to have the follwong code for displaying the item introtext:
Log in or Create an account to join the conversation.
- Voiceconnect Internet Solutions
-
- Offline
- Junior Member
Less
More
- Posts: 39
9 years 6 months ago #104706
by Voiceconnect Internet Solutions
Replied by Voiceconnect Internet Solutions on topic Re: SOLVED Re: Can we have "Introtext word limit"
Thanks Phil - what i needed but only not in the category_item.php but in my latest_item.php where i replaced
<?php echo $this->item->introtext; ?>
with your code
<?php echo K2HelperUtilities::wordLimit($this->item->introtext, 50); ?>
<?php echo $this->item->introtext; ?>
with your code
<?php echo K2HelperUtilities::wordLimit($this->item->introtext, 50); ?>
Please Log in or Create an account to join the conversation.
- maiky
-
- Offline
- Junior Member
Less
More
- Posts: 33
8 years 6 months ago #104707
by maiky
AJMG
Replied by maiky on topic Re: Can we have "Introtext word limit"
hello i think you verry much for your post i was looking for since many day and you save me
AJMG
Please Log in or Create an account to join the conversation.
- Stuart Claggett
-
- Offline
- Junior Member
Less
More
- Posts: 21
7 years 7 months ago #104708
by Stuart Claggett
Replied by Stuart Claggett on topic Re: [SOLVED] Can we have "Introtext word limit"
Worked for me. Thanks for sharing the solution ;)
Please Log in or Create an account to join the conversation.