Keyword

Read more in articles

  • bruce the boss
  • bruce the boss's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101303 by bruce the boss
Read more in articles was created by bruce the boss
Hello,

I do have a question about my site (www.vvhapert.nl).

On every article I place on the site there is a "read more" / "lees meer" even if there is no more text to read and I don't want this.

I have had a look into the settings and I disabled the "read more" options but this isn't working and I'm wondering how to solve this ?

Can somebody help me with this please?

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

More
12 years 2 months ago #101304 by william white
Replied by william white on topic Re: Read more in articles
The read more thats showing on your linked page is coming from category_item.php file.
To change this you will probably need to create an override and edit this same file in the override.
Find this block of code
<?php if ($this->item->params->get('catItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>
When you create an item with and do not insert a readmore with the editor all of the text is placed in the introtext
When you create an item and insert a readmore the text below the readmore is placed in fulltext

You will have to improve the test at the top of the code block
<?php if ($this->item->params->get('catItemReadMore')): ?>
to include a test that also checks for the existance of fulltext in the item and add and else to the statement to display nothing when there is nothing in fulltext

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

  • bruce the boss
  • bruce the boss's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101305 by bruce the boss
Replied by bruce the boss on topic Re: Read more in articles
Thanks for your quick reply :)

I have read you text a couple of times but I'm not sure what I do have to do in order to solve the problem. I have found the file and also the block of code but do you mean that I have to add something to the code or ........ ?

Could you please explain a little bit more?

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

  • bruce the boss
  • bruce the boss's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago - 12 years 2 months ago #101306 by bruce the boss
Replied by bruce the boss on topic Re: Read more in articles
I found the solution in this answer ........... HERE

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

More
12 years 2 months ago #101307 by william white
Replied by william white on topic Re: Read more in articles
Nice Find, I had read that post before, but could not find it and did not exactly remember the code.
Be sure to put the changes in an override (see docs and videos) so you wont loose your changes on upgrade

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


Powered by Kunena Forum