Gossamer Forum
Home : Products : Links 2.0 : Customization :

Open link in new window final solution

Quote Reply
Open link in new window final solution
This is not a question post. It's merely a solution post to all those interested in how to have the links open in a new window. I posted this earlier but apparently someone deleted it. So, for the benefit of others, here's the results of how we got it to work. Hopefully you won't have to search through pages of postings to get the answer from now on! Laugh

In 'index.html' template, find the line that states:

<%ifnot Details%>
<a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>

This is the line if your are NOT using the 'details' view for your links

Change it to this:

<%ifnot Details%>
<a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>" target="newwin"><%Title%></a>

Thanks to Paul and Eliot for their assistance. I hope this helps others looking for the same answers.

Quote Reply
Re: Open link in new window final solution In reply to
FYI: It wasn't deleted, it is available a few posts down from this at http://www.gossamer-threads.com/...w=collapsed&sb=5 Wink

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Open link in new window final solution In reply to
Thanks, Andy. I saw that later after I posted this thread. Actually, the one I was referring to was locked. Got a little heated Tongue



Quote Reply
Re: Open link in new window final solution In reply to
....and all over a little bit of html Smile

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Open link in new window final solution In reply to
hehe..... yep! Laugh

Quote Reply
Re: Open link in new window final solution In reply to
Sorry for being a fool, bur it seems that i canīt find the template index.html. Where is it located ?

Kim


Quote Reply
Re: Open link in new window final solution In reply to
Kim, I apologize. It's not the 'index.html' it's the 'link.html' file. My bad.

Quote Reply
Re: Open link in new window final solution In reply to
I believe the pages/index.html is built from combining the sub site_html_print_cat in the site_html_templates.pl file with the home.html file located in the templates folder.

Gene
Quote Reply
Re: Open link in new window final solution In reply to
Thanks, it worked!

hehe.. this was my first time coming to these forums and searching and actually finding the answer to my question right away..

thanks! no on to problem number 2..

http://www.hiphopgateway.com
http://www.diligentimpact.com
Quote Reply
Re: Open link in new window final solution In reply to
In Reply To:

hehe.. this was my first time coming to these forums and searching and actually finding the answer to my question right away..


Thank you for searching the forums...I appreciate your effort...since quite a few newbies don't take the time to search the forums...or at least take more than two minutes to search the forums.

Thanks again for your effort! Smile

Regards,

Eliot Lee
Quote Reply
Re: [Stealth] Open link in new window final solution In reply to
UnsureUnsureUnsurevery good guys could you please edit the first part of this post for us idiots that don't know to read the whole thing. LOL btw it works great.
Post deleted by pflyz In reply to
Quote Reply
Re: [couponangel] Open link in new window final solution In reply to
Can this be extended in some way to include the "Random" Link...? This functions for regular links but if you click on Random Link, you're not redirected in a new window...
Quote Reply
Re: [SodaJim] Open link in new window final solution In reply to
yea, simply add target="newwin" in your RANDOM link HREF codes.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Open link in new window final solution In reply to
newwin isn't a good solution it seems as it will not let you open a browser more than once. Use _blank
Quote Reply
Re: [Paul] Open link in new window final solution In reply to
Here we go again...I disagree, since _blank is not universally accepted across different web browsers.

Paul, if you would like to discuss this issue further, please feel to PM me rather than continuing to harrass me in the forums. Thank you.

Goodbye.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Open link in new window final solution In reply to
Questioning a solution you provided is not harrassment.

Quote:
_blank is not universally accepted across different web browsers

That's correct. I guess you need to decide on a balance and what suits your needs. You either have to use _blank which will eliminate some browsers, or use newwin which will only open one window and then fail to open any more.
Quote Reply
Re: [Paul] Open link in new window final solution In reply to
I think you can solve this by using

target = "_win<%ID%>"

instead of
target = "_new"
or
target = "_blank"

etc... As ID is unique.
Of course, you could even try
_win_<%Title%> or such..
Quote Reply
Re: [webslicer] Open link in new window final solution In reply to
using the <%Title%> field is not good, because of spaces, the better approach is using the <%ID%> as you stated.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Open link in new window final solution In reply to
Right!

I've been using the Title field after the spaces are converted to underscores with a regex...