TinyPortal

Development => Support => Topic started by: elpvn on January 13, 2006, 05:10:24 AM

Title: Open link with new window in content block ?
Post by: elpvn on January 13, 2006, 05:10:24 AM
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:
Title: Re: Open link with new window in content block ?
Post by: borgBOB on January 13, 2006, 05:25:05 AM
Wht not use a html block then? Just name it Content.
Title: Re: Open link with new window in content block ?
Post by: Rasyr on January 13, 2006, 11:15:05 AM
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.
Title: Re: Open link with new window in content block ?
Post by: elpvn on January 13, 2006, 12:22:38 PM
Thanks you very much! That's all need help in this case

Thank again! borgBOB &  Rasyr   :)