Stubborn Fanatic

Avatar

Documenting Tech Fanaticism


You're browsing: Home » blogger, blogging, hacks news, my hacks, suggested » Blog article: Linklists don’t open in a new window and new hacks

Linklists don’t open in a new window and new hacks


Just a quick update. I found that links added via the link list feature do not open in a new window. This might take away traffic from your blog. The solution to this is however, very simple. Open up you template’s HTML code in expanded widgets format. Copy the entire code into notepad or some text editor and search for a particular link list using its title. (In my case the title is “friends on www”)

Scroll to the line which reads a expr:href=”data:link.target’ blah blah blah… and append target=’_blank’ over there, as shown in the example below. As this piece of code is in a loop (b:loop) you need to type it only once and there you are. So go ahead and make the modification.

<b:widget id=’LinkList2′ locked=’false’ title=’friends on www’ type=’LinkList’>
<b:includable id=’main’>

<b:if cond=’data:title’><h2><data:title/></h2></b:if>
<div class=’widget-content’>
<ul>
<div id=’link’>
<b:loop values=’data:links’ var=’link’>
<li><a expr:href=’data:link.target’ target=’_blank’><data:link.name/></a>
</li>
</b:loop>
</div>
</ul>

Also check out some cool new hacks I came across recently:

1. Turning labels into menu tabs (used in my blog)
2. Peek-a-boo label drop downs (used in my blog)
3. Convert link lists to thumbnail picture list

Update: I found an article which tell why one should avoid setting all links to open in a new window. It tells how this setting can backfire and kill traffic. Read it here.


No related posts.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
PDF version
  • Ririan

    thanks, works great! :)

  • Ririan

    thanks, works great! :)

  • apnerve

    Please write a tutorial on the “listen to this article” thing. That was fantastic

  • apnerve

    Please write a tutorial on the “listen to this article” thing. That was fantastic

  • Vivek Sanghi

    hi apnerve. sure! it’s in the pipeline.

  • Vivek Sanghi

    hi apnerve. sure! it’s in the pipeline.

  • Green Chameleon

    Thank you, I find this very useful!

  • Green Chameleon

    Thank you, I find this very useful!

  • Vivek Sanghi

    @green chameleon
    Thanks for the feedback and stopping by!

    @Ririan
    Apologies for acknowledging your feedback, so late. I somehow overlooked it. Thanks for the feedback. Check back often for new and updated hacks. cheers!

  • Vivek Sanghi

    @green chameleonThanks for the feedback and stopping by!@RirianApologies for acknowledging your feedback, so late. I somehow overlooked it. Thanks for the feedback. Check back often for new and updated hacks. cheers!

  • New-to-code

    Hi, it works great thx! But how do I fix the same issue for links inside a post? I can’t find the part of the code that deals with this…

  • New-to-code

    Hi, it works great thx! But how do I fix the same issue for links inside a post? I can’t find the part of the code that deals with this…

  • Vivek Sanghi

    Hello new-to-code. Thanks for visitng my blog. To open the links (from a post) in a new window you need to add the target=’_blank’ code after the href=”[link]” part. You can view this code by clicking on the Edit HTML section of your post editor and searching for the link href thinggy in there. Let me know if you face any problems.

  • Vivek Sanghi

    Hello new-to-code. Thanks for visitng my blog. To open the links (from a post) in a new window you need to add the target=’_blank’ code after the href=”[link]” part. You can view this code by clicking on the Edit HTML section of your post editor and searching for the link href thinggy in there. Let me know if you face any problems.

  • new-to-code

    Hi again,
    You mean I can’t do it in the main code, so that it applies to ALL links? Do I have to do it in every post?

  • new-to-code

    Hi again, You mean I can’t do it in the main code, so that it applies to ALL links? Do I have to do it in every post?

  • Vivek Sanghi

    Hello new-to-code. I did not think about checking the main code as I post my articles directly from the “Edit HTML” editor. I will check out the main code and let you know if some thing can be done about this. Do check back for updates.

  • Vivek Sanghi

    Hello new-to-code. I did not think about checking the main code as I post my articles directly from the “Edit HTML” editor. I will check out the main code and let you know if some thing can be done about this. Do check back for updates.

  • Vivek Sanghi

    @new-to-code:
    I have looked into the template and could not find any coding that deals with links appearing within the post. With reference to this issue and other stuff that appears inside a post, I think no modifications can be carried out in the template. Blogger should make changes at their end. However, you might want to put this question on the blogger help-group (on google groups). All the best.

  • Vivek Sanghi

    @new-to-code:I have looked into the template and could not find any coding that deals with links appearing within the post. With reference to this issue and other stuff that appears inside a post, I think no modifications can be carried out in the template. Blogger should make changes at their end. However, you might want to put this question on the blogger help-group (on google groups). All the best.

  • new-to-code

    Thx a lot! It is good to know it isn’t just me having the issue :)

  • new-to-code

    Thx a lot! It is good to know it isn’t just me having the issue :)

  • new-to-code

    Hi! Is there a way to set my blog (blogger beta) so that the all comments are visible? As it is now it just tells you how many comments there are in a post.

  • new-to-code

    Hi! Is there a way to set my blog (blogger beta) so that the all comments are visible? As it is now it just tells you how many comments there are in a post.

  • Vivek Sanghi

    Welcome back new-to-code. While there is no hack to set the comments to display on the main blog page as it loads. There is a hack which allow readers to views comments without navigating away from the main blog page. Check it out here

  • Vivek Sanghi

    Welcome back new-to-code. While there is no hack to set the comments to display on the main blog page as it loads. There is a hack which allow readers to views comments without navigating away from the main blog page. Check it out here

  • lola

    you are totally awesome. this is great. thanks so very much for sharing!!

  • lola

    you are totally awesome. this is great. thanks so very much for sharing!!

  • Vivek Sanghi

    thanks!

  • Vivek Sanghi

    thanks!

  • Sammie

    not sure why I can’t find out where to change this. Any help you can provide?

  • Sammie

    not sure why I can’t find out where to change this. Any help you can provide?

  • Ted

    Hi, I create post on my blog, in that post I put a link. I put the target=”_blank”, but it still opens in the same window. The link I tried to create is:

    HREF=”http://www.amazon.com/gp/music/wma-pop-up/B000IHY9RU001002/ref=mu_sam_wma_001_002/102-8241256-7896968″ target=”_blank”>song clip here
    (note “a” tags are removed to post here”

    what is wrong with the above that the target doesn’t work? Any ideas?

  • Ted

    Hi, I create post on my blog, in that post I put a link. I put the target=”_blank”, but it still opens in the same window. The link I tried to create is: HREF=”http://www.amazon.com/gp/music/wma-pop-up/B000IHY9RU001002/ref=mu_sam_wma_001_002/102-8241256-7896968″ target=”_blank”>song clip here(note “a” tags are removed to post here”what is wrong with the above that the target doesn’t work? Any ideas?

  • Ari

    Thank you for this useful tip! I’m a web development veteran, but CSS is a new animal for me.

  • Ari

    Thank you for this useful tip! I’m a web development veteran, but CSS is a new animal for me.

  • Sasi priya

    Hey….this is priya….i want my linklists to open in a new window…i tried wat u said but…it didnt workout…well ill day i made a mistake..so can u help me out..ill give u my html code and can u make changes to it and send it back to me or somethin like that..
    plzzz suggest me..
    ill be w8in for ur reply

  • Sasi priya

    Hey….this is priya….i want my linklists to open in a new window…i tried wat u said but…it didnt workout…well ill day i made a mistake..so can u help me out..ill give u my html code and can u make changes to it and send it back to me or somethin like that..plzzz suggest me..ill be w8in for ur reply