Keyword

No "read more" when Introtext == FullText

  • Bart Baetens
  • Bart Baetens's Avatar Topic Author
  • Offline
  • New Member
More
10 years 10 months ago #121052 by Bart Baetens
No "read more" when Introtext == FullText was created by Bart Baetens
Hi, I want to to show the "read more" only in case the fulltext is larger than the introtext (using a modification in "category_item.php").

My solution was to test if the length of fulltext was bigger than the introtext using "mb_strlen" and it appeared that the length of the introtext was filled (more than zero characters), but the length of fulltext was always zero. Any ideas how I can test the length of fulltext, because than I can solve it using:

<?php if ($this->item->params->get('catItemReadMore') && (mb_strlen($this->item->fulltext) > mb_strlen($this->item->introtext))): ?>

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
10 years 10 months ago #121053 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: No "read more" when Introtext == FullText
I think the fulltext field is filled only in case you added a readmore link in the item editor window, otherwise all the text you enter is saved in the introtext field in the database.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

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


Powered by Kunena Forum