Intechnic
Users Developers
Home / Forums / In-Portal CMS / General In-Portal Discussions / Open Link in New Windows / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

Open Link in New Windows (5)


Posted: 09/19/2005 5:35:17 PM

Reply Quoted  


Is it any posibility to make links opened in new windows?
Tnak you.

Posted: 09/20/2005 11:10:58 AM

Reply Quoted  


rushhohol wrote:09/19/2005 5:35:17 PM
Is it any posibility to make links opened in new windows?
Tnak you.


Hello rushhohol

In order to make a link open in a new window you need to add the 'target="_blank"' parameter inside the link code. For example:
change <a href="index.php">Home</a>
to <a href="index.php" target="_blank">Home</a>

For a little more involved example: Let's say you want to change the 'Home' button on top of the default In-Portal theme so that it opens a new window. You first need to go to themes/default/common/pagetop.tpl, where the top part of the default page sits, find the line that reads:

<td><a id="homelink" href="<inp:m_template_link _Template="index" _Category=0 />"><inp:m_language _Phrase="lu_home" /></a></td>

and change it to:

<td><a target="_blank" id="homelink" href="<inp:m_template_link _Template="index" _Category=0 />"><inp:m_language _Phrase="lu_home" /></a></td>

Let me know if that answers your question.


Posted: 09/21/2005 1:18:12 AM

Reply Quoted  


Yes, I know that.
But this is about individual link. I talking about every added links in Directory. When we enter link we use only URL address.

The tag 'target="_blank"' we able to add only to HTML code or some code in template which responcible to view that link.

I'm asking if any possibility to add that script to template. For example LINK.TPL in \in-portal\themes\default\inlink\index or what ever file is.

Thank you.

Posted: 09/21/2005 11:41:34 PM

Reply Quoted  


rushhohol wrote:09/21/2005 1:18:12 AM
Yes, I know that.
But this is about individual link. I talking about every added links in Directory. When we enter link we use only URL address.

The tag 'target="_blank"' we able to add only to HTML code or some code in template which responcible to view that link.

I'm asking if any possibility to add that script to template. For example LINK.TPL in \in-portal\themes\default\inlink\index or what ever file is.

Thank you.





Hoi,

i changed the "link_element.tpl" in the folder"themes/default/inlink/index"

the line :
<a href="<inp:link _field="redirect" />"<inp:link _field="additional_params"/>><inp:link _field="name" /></a> to next :

<a href="<inp:link _field="redirect" />" target="_blank" <inp:link _field="additional_params"/>><inp:link _field="name" /></a>

Now you see every link in a new window = OK


Leo

ImmoLink

[Edited By ImmoLink on 09/21/05 11:50:26 PM]

Posted: 09/22/2005 1:28:19 AM

Reply Quoted  


ImmoLink wrote:09/21/2005 11:41:34 PM
rushhohol wrote:09/21/2005 1:18:12 AM
Yes, I know that.
But this is about individual link. I talking about every added links in Directory. When we enter link we use only URL address.

The tag 'target="_blank"' we able to add only to HTML code or some code in template which responcible to view that link.

I'm asking if any possibility to add that script to template. For example LINK.TPL in \in-portal\themes\default\inlink\index or what ever file is.

Thank you.





Hoi,

i changed the "link_element.tpl" in the folder"themes/default/inlink/index"

the line :
<a href="<inp:link _field="redirect" />"<inp:link _field="additional_params"/>><inp:link _field="name" /></a> to next :

<a href="<inp:link _field="redirect" />" target="_blank" <inp:link _field="additional_params"/>><inp:link _field="name" /></a>

Now you see every link in a new window = OK


Leo

ImmoLink

[Edited By ImmoLink on 09/21/05 11:50:26 PM]


WOW!!!. It's work!!!

Thank you.