- Posts: 32
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Show "Read More" only if there is something to "read more"?
Show "Read More" only if there is something to "read more"?
- Elisa F.
-
Topic Author
- Offline
- Junior Member
Less
More
15 years 4 weeks ago #89693
by Elisa F.
Show "Read More" only if there is something to "read more"? was created by Elisa F.
Hi there!
I have some items with long text and some with short text. Some need to have a "read more" link - the others don´t.
Now i have the possibility to switch on or off the "read more" in the Categorysetting.
With this setting the short items which don´t need to have a read more link will anyway have this link.
Now i can overwrite the Categorysettings in each item to tell the item not to show the "read more" - which is a little bit exhausting.
Well, my question: Can this be hidden automaticly in each short item?
thanks
Elisa
I have some items with long text and some with short text. Some need to have a "read more" link - the others don´t.
Now i have the possibility to switch on or off the "read more" in the Categorysetting.
With this setting the short items which don´t need to have a read more link will anyway have this link.
Now i can overwrite the Categorysettings in each item to tell the item not to show the "read more" - which is a little bit exhausting.
Well, my question: Can this be hidden automaticly in each short item?
thanks
Elisa
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
15 years 3 weeks ago #89694
by william white
Replied by william white on topic Show "Read More" only if there is something to "read more"?
The reference to readmore is found in category_item.php of your overrides.
You will have to devise another test besides if readmore is set to show in that category....and wrap the existing if statement with it
If you are showing the intro text then you could try to test for the length of the full text and display the readmore only if text exists
You will have to devise another test besides if readmore is set to show in that category....and wrap the existing if statement with it
If you are showing the intro text then you could try to test for the length of the full text and display the readmore only if text exists
Please Log in or Create an account to join the conversation.
- Elisa F.
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
15 years 3 weeks ago #89695
by Elisa F.
Replied by Elisa F. on topic Show "Read More" only if there is something to "read more"?
Thanks, but with this I think i have to take some php lessons :)
Please Log in or Create an account to join the conversation.
- Angel Aramboles
-
- Offline
- New Member
Less
More
- Posts: 1
14 years 10 months ago #89696
by Angel Aramboles
Replied by Angel Aramboles on topic Show "Read More" only if there is something to "read more"?
I found a fix.
See this thread: community.getk2.org/forum/topics/read-more-always-shown?commentId=3536014:Comment:92308
See this thread: community.getk2.org/forum/topics/read-more-always-shown?commentId=3536014:Comment:92308
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Show "Read More" only if there is something to "read more"?