0

I have a module with articles created with the displaynews plugin. If I click the read more of the articles they go to the full article. But I want them to go to a category blog layout and scroll to the correct article (using the id).

Any idea how this works? I don't even know how to change the link of the read more..

0

Not easy but i hope to give you some good starting points.

  1. Learn about "Template override". It means you can change the HTML output of component without hacking Joomla core code.

  2. Use what learned at 1. so you can put an anchor near every article in your blog layout. Hint: you will have to change file:

/templates/[your template]/html/com_content/category/blog_item.php

If it's not there, create it by copying

/components/com_content/views/category/tmpl/blog_item.php

Let's say the anchor you put near every article is something link

<a id="article_<?php echo $this->item->id" ?>" />
  1. Depending on how displaynews plugin (or module?) is coded, you can use what learned at point 1. or you will have to hack the plugin (or module?) code itself. You can change the readmore link from

index.php?option=com_content&view=article&id=XX

to

index.php?option=com_content&view=category&layout=blog&id=CC#article_XX

where CC is the CATEGORY id, while XX is the ARTICLE id

  • thanks I know how to make template overrides, I think the difficult part here is to alter the read more link to the category/section blog and not the article itself – Ruben May 3 '11 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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