Keyword

I'd like to move the 'read more' button directly to the end of the intro text (joomla component)

  • GeGeFe
  • GeGeFe's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #93363 by GeGeFe
in my template the 'read more' button is located below the intro text div. Actually I'd like to attach it directly to last sentence of the abstract like on many news pages. I hope to catch visitors attention even better this way because some of them reported that it didn't even occur to them that there is a button like this at all...

I've edited the template to my needs but I have no idea how to get the read more div into the intro text div. Has anybody managed to do so yet?

the url is www.gegefe.de

cheers

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

More
13 years 8 months ago #93364 by william white
In 2.4.1 look in category_item.php around line 264-271 for catItemReadMore

Move this entire block of code to just below catItemIntroText around line 123-128

This should move the read more to just below the intro text

All of this would be best accomplished by using an override and assigning it to the categorie or categories in question.

If you are using an earlier version just search for the div names and it should be smiliar

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

  • GeGeFe
  • GeGeFe's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #93365 by GeGeFe
Hey William,
I've moved the readMore block right into the introText but there's still a break between them. You can check my website to see the effect. There's no display:block or inline-tag in the CSS so far. As I'm not a pro in templating yet I may have missed something.

I'm not using any override yet. In fact I had no idea about overriding until you told me to do so. I'll try to extract all modified code using the override before updating k2 next time. Thanks for that!

 

The actual code looks like this:

<?php if($this->item->params->get('catItemIntroText')): ?> <!-- Item introtext -->
<div class="catItemIntroText">
<?php echo $this->item->introtext; ?>

<?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::_('Read more...'); ?>
</a>
</div>
<?php endif; ?>

</div>
<?php endif; ?>

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

More
13 years 8 months ago #93366 by william white
Im not sure if this will work or not, but you might try taking the div class and / div out of the readmore and see what happens

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

  • GeGeFe
  • GeGeFe's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #93367 by GeGeFe
It's a pity but I've already tried this and it applies without having any effect at all.

cheers

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

More
13 years 8 months ago #93368 by william white
The continue reading link looks ok to me just below the intro text in the category view at the link above you posted.

I checked both in ie and ff and i do not see the space there

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

More
13 years 8 months ago #93369 by william white
Please see friend request and pm me

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

  • GeGeFe
  • GeGeFe's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #93370 by GeGeFe
You're right. Now it's just below the last sentence. But what I'd like to do is to put it directly at the end of each articles abstract (at the end of the sentence) and not below it.

 

Like on www.spiegel.de e.g.

 

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

More
13 years 8 months ago #93371 by william white
There is a p tag around intro text by default. Add the strip_tags php function to the itemIntroText and this will work. See Attached snipet
Attachments:

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

More
11 years 8 months ago #93372 by Tom
:cheer: i have still the same problem in the newest k2 version-

I try this out but the Readme buton is not exactly behind the ReadMore Text.

Maybe you can give me some further helps?


Best wishes Tom

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


Powered by Kunena Forum