The most common problem at the time of uploading a new template is that we “lose our widgets”. Is there a way of installing a new template without having to get rid of our beloved widgets? The answer is yes, and yes, it’s simple
.

1. Go to Layout> Edit HTML and without checking the “Expand widget templates” box, look for this piece of code:
<b:section class='sidebar' id='sidebar' preferred='yes'>Below that line you will find your template’s widgets:
<b:widget id='BlogArchive1' locked='false' title='Blog Archives'
type='BlogArchive'/>
<b:widget id='Profile1' locked='false' title='My Profile'
type='Profile'/>2. Copy those widgets and keep them save (wherever).
3. Upload the new template.
Blogger will warn you that your widgets are going to be deleted. Do NOT continue.
4. Go to the same piece of code where you took your widgets from:
<b:section class='sidebar' id='sidebar' preferred='yes'>And paste the widgets you copied, below. In the end, the whole code should look like this:
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='BlogArchive1' locked='false' title='Blog Archives'
type='BlogArchive'/>
<b:widget id='Profile1' locked='false' title='My Profile'
type='Profile'/>
</b:section>That’s it!
*Asides | Lee esto en español
1. Go to Layout> Edit HTML and do NOT check the “Expand widget templates” box:

2. Look for this line of code:
<b:widget id='Label1' locked='false' title='Labels' type='Label'/>3. Replace it with the following code:
<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:labels' var='label'>
<b:if cond='data:label.count > 2'>
<li>
<b:if cond='data:blog.url == data:label.url'>
<data:label.name/>
<b:else/>
<a expr:href='data:label.url'>
<data:label.name/>
</a>
</b:if>
(<data:label.count/>)
</li>
</b:if>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
4. In the first line highlighted in red, you decide the minimum number of posts a label needs to have in order to be displayed in your Labels’ widget/gadget.
![]()
Here we can use a script thta will make every external link to open in a new page.
- Go to the “Template” tab, also called “Layout” from the desktop, and then go to “Edit HTML”.
- Search the following text:
- In the last code, replace www.yourblog.blogspot.com and yourblog.blogspot.com for your blog’s address, and that’s it.

]]></b:skin>and just after this paste the following:
<script language='javascript'>
var dominio = "www.yourblog.blogspot.com";
var dominio1 = "yourblog.blogspot.com";
var script = "javascript:void(0);";
var imagenesblogger0 = "bp0.blogger.com";
var imagenesblogger1 = "bp1.blogger.com";
var imagenesblogger2 = "bp2.blogger.com";
var imagenesblogger3 = "bp3.blogger.com";
var blogger1 = "www.blogger.com";
var blogger2 = "www2.blogger.com";
var publicidad = "pagead2.googlesyndication.com";
function LinksExternos() {
var Externo;
if (document.getElementsByTagName('a')) {
for (var i = 0; (Externo = document.getElementsByTagName('a')[i]); i++) {
if (
Externo.href.indexOf(dominio) == -1 &&
Externo.href.indexOf(dominio1) == -1 &&
Externo.href.indexOf(script) == -1 &&
Externo.href.indexOf(imagenesblogger0) == -1 &&
Externo.href.indexOf(imagenesblogger1) == -1 &&
Externo.href.indexOf(imagenesblogger2) == -1 &&
Externo.href.indexOf(imagenesblogger3) == -1 &&
Externo.href.indexOf(publicidad) == -1 &&
Externo.href.indexOf(blogger1) == -1 &&
Externo.href.indexOf(blogger2) == -1
)
{
Externo.setAttribute('target', '_blank');
//Externo.setAttribute('class', 'linkexterno');
}
}
}
}
window.onload = function() {
LinksExternos();
}
</script>Lee este artículo en español: Abrir los links externos en una nueva página en Blogger.
