tmjam
tmjam

Reputation: 1039

Make read more link open on separate page in joomla

I am using joomla 2.5. When creating an article I add read more links to it. The issue I am having is, when a page has a single article then the read more link overwrites that content with the new article. I want the read more link to open as a separate page. I want it to be dynamic and not manually change.

Any thing I am missing ? Any help is appreciated. Thanks

Upvotes: 1

Views: 10492

Answers (2)

Samuel
Samuel

Reputation: 76

I am not sure if you sorted it out but I think I know what you mean.

You may need to create a new Menu and use it as a hidden menu

so to have your articles open in a separate page or its own page create a hidden menu.

1 - Go to Menu 2 - click Menus tab next to Menu Items 3 - click new 4 - give it a Title example Hidden Menu 5 - fill out Menu type example Hidden 6 - Description optional

in this new menu you created you want to create a menu item

depending on where your articles are stored will depend on your menu item

lets say your articles are in a category named news

make a new Menu Item, call it what you want

then in menu item type select Category Blog and in the Required Settings choose your category...

save your menu item...

that should do what you want...

so in your main menu you have an article that is in the news category when you click on it. the article should open in the same window by itself...

excuse any spelling mistakes found...

Upvotes: 6

Shaz
Shaz

Reputation: 2647

I went through the Newsflash module options and the source code as well, unfortunately the module will always open the links on the same window.

You will need to override the layout to modify this behavior.

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

This is the file that you need to 'clone' in your template folder as explained in the link above:

modules/mod_articles_news/tmpl/_item.php

Finally, in the new file modify the line 16 to this:

<a href="<?php echo $item->link;?>" target="_blank">

and then the line 34

echo '<a class="readmore" href="'.$item->link.'" target="_blank">'.$item->linkText.'</a>';

Upvotes: 0

Related Questions