Sunday, March 25, 2012

Open Links in the Same Tab in Blogger Dynamic Views



In Dynamic Views, some of the links open in a new tab by default. The home link and custom links added to your Pages gadget are examples of such links. Since there wasn't a way to edit Dynamic View's HTML, it was difficult to force this link to open in the same tab. Thankfully, Fahad from My Blogger Tips found a brilliant hack to edit Dynamic View's HTML. We can now make modifications we've always been dreaming of. BTW, shoutouts to the Anonymous comment that suggested Fahad's hack, and Kiran Shenoy who found a workaround by using HTML redirects. Now, to the main event of this evening..

Step 1:

To edit your Dynamic View's template, go to Dashboard >> Template. Note the address in your browser's address bar. It should look something like this:
http://www.blogger.com/blogger.g?blogID=3462318257116246218#template
Change the 'blogger.g' part to 'html'. It should now look something like this:
http://www.blogger.com/html?blogID=3462318257116246218#template
Hit 'Enter' on your keyboard and you should now be able to edit your Dynamic View's HTML. Again, thanks to Fahad from My Blogger Tips for this great hack.

Step 2:

Backup your template by clicking on 'Download Full Template'.

Next, to make links open in the same tab by default, find and delete the following line.
<base target='_blank'/>
Save your template when you're done. Your links should now load on the same tab by default. You'll still find some stray links opening in new tabs, since they're hardcoded that way. If you find any, leave a comment and we'll take care of them individually.

Extra:

In some cases, you might get the following warning:


If this happens to you, find and delete the following line, and you should be able to save your template.
<b:widget id='Navbar1' locked='true' title='Navbar' type='Navbar'/>

Elm0D

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment

Navigate» Become author for this Blog

Manual Categories