5

I want to add a class to the Read More link found in //components/com_content/views/category/tmpl/blog_item.php

I want the class to be:

<a class="btn btn-primary readmore-link">

But I can't find where to edit it. The standard html output in the frontend is:

<p class="readmore">
    <a class="btn readmore-link" href="index.php?option=com_content&amp;view=article&amp;id=23:re-leve&amp;catid=17&amp;Itemid=330" title="TEST">Read more ...</a>
</p>

I know I need to edit the file with an override (putting it here):

//templates/TEMPLATE/html/com_content/category/blog_item.php

but the only code it refers to within the file is:

<?php echo JLayoutHelper::render('joomla.content.readmore', array('item' => $this->item, 'params' => $params, 'link' => $link)); ?>

Any ideas please?

1 Answer 1

9

JLayoutHelper renders layouts originally from /layouts folder.

First parameter is basically path to file. Just replace . with / in your mind :).

So readmore.php is located at

/layouts/joomla/content/readmore.php

Copy it to

templates/YOUR_TEMPLATE/html/layouts/joomla/content/readmore.php

and edit it there.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.