Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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..

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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