Closed (fixed)
Project:
Read More Link (Drupal 6 and earlier)
Version:
6.x-5.0-rc7
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
17 Dec 2009 at 11:26 UTC
Updated:
20 Jan 2010 at 15:50 UTC
could you teach me how can i make the read more link to open in a new window. thanks
Comments
Comment #1
todd nienkerk commentedYou can override the theme function that generates the link:
theme_ed_readmore_link().Before:
Copy this function to your theme's
template.phpfile. Change the name so that "theme_" is replaced with your theme name (e.g., "mythemename_").Here's the code after the change:
Notice I only added one line:
Comment #2
dhon commentedit doesn't work. instead i modify the .module file of ed_readmore
i try adding a code in the function. here it is:
i know i shall not edit the module file, but it somehow works with me and that's more important i think. ^^ hope it can help to those who need it
Comment #3
todd nienkerk commenteddhon: When you say my suggestion in #1 above doesn't work, can you verify that you did the following:
(1) Edited your theme's template.php file by pasting in the code above.
(2) Changed "mythemename_" to the name of your theme followed by an underscore: "garland_ed_readmore_link", "zen_ed_readmore_link", "great_theme_ed_readmore_link", etc.
(3) Flush the theme registry. If you don't do this, Drupal won't know you added a theme override.
I tried the steps in #1 on a test site, and it worked perfectly. Please make sure you followed the three steps above.
And you're right about editing the module file: Don't do it! :)
Comment #4
todd nienkerk commentedI added a checkbox in the module settings UI that adds
target="_blank"to the Read More link. This will appear in a later release.