TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,217
  • Total Topics: 21,351
  • Online today: 556
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Open link with new window in content block ?

Started by elpvn, January 13, 2006, 05:10:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

elpvn

How can I add a link at content block with case: when I click on it then it open in new windows (can not  use tab target="_blank" after link path)  :uglystupid2:

borgBOB

Wht not use a html block then? Just name it Content.

Rasyr

If you want to change it so that ALL links to external pages open in a new window, then all you need is a small code change.

Note: this only affects those of the "link" type as generated using the Menu Manager.

Open TPortalBlocks.template.php in an editor.
Find the following code (approximate location - line 89):


                case 'link' :
                    echo '<a href="'.$cn['IDtype'].'">'.$cn['name'].'</a><br />';
                    break;



Change it so that it reads as follows:


                case 'link' :
                    echo '<a href="'.$cn['IDtype'].'" target="_blank">'.$cn['name'].'</a><br />';
                    break;



This will make every thing that you put into the menu that is a "link" open up in a new window.

elpvn

Thanks you very much! That's all need help in this case

Thank again! borgBOB &  Rasyr   :)

This website is proudly hosted on Crocweb Cloud Website Hosting.