Closed (fixed)
Project:
Leech
Version:
5.x-1.x-dev
Component:
leech
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2007 at 14:53 UTC
Updated:
14 May 2007 at 20:38 UTC
Is it possible to have set outgoing links to open in new window?
Comments
Comment #1
designerbrent commentedgumdrop,
Try this in your tpl file:
Brent
Comment #2
designerbrent commentedComment #3
PCanzona commentedIn the Garland theme, exactly which tpl file would you add this to?
Pete
Comment #4
designerbrent commentedthat should go in your node.tpl.php file if memory serves me correctly.
Comment #5
PCanzona commentedHi, here's the code from Garland's node.tpl.php file:
phptemplate_comment_wrapper(NULL, $node->type);if ($sticky) { print ' sticky'; }if (!$status) { print ' node-unpublished'; }">print $pictureif ($page == 0):print $node_url " title="
print $title">print $titleendif;if ($submitted):print t('!date — !username', array('!username' => theme('username', $node), '!date' => format_date($node->created)));endif;print $contentif ($taxonomy):print $termsendif;if ($links):print $links;endif;Where exactly would I place " print $leech_news_item->link " target="_blank" title="
print $title">print $title" to make it work? I've tried several places already.Thanks much,
Pete
Comment #6
designerbrent commentedPete,
If you are modifying Garland just for your Leech theme this will be fine.
Replace line 8 of node.tpl.php with the following:
Cheers,
Brent
Comment #7
PCanzona commentedHi Brent,
I replaced line 8 in node.tpl.php with your code and, for some reason, the link is still opening up in the same window or tab (in I.E. and Firefox, respectively). Any ideas why this could be? I really don't want users redirected away from the site.
Thanks for all your time.
Pete
Comment #8
designerbrent commentedPete,
My guess is that you may be trying a different link? This snippit will change the title link on the teaser view of the item, not the link list at the bottom of each node. (I'm not sure how to change those links, sorry!)
Cheers,
Brent
Comment #9
PCanzona commentedHi Brent, Yes you are right: The header link works perfectly now (opens in a different window/tab). Is there a way to suppress the display of the "read original article" link in the teaser list?
Thanks so much,
Pete
Comment #10
designerbrent commentedI haven't played with the module that far, but the obivious way is to comment out the 'print $links; ' line.
Good luck.
Brent
Comment #11
dries commented