Web-Stat web traffic analysis

martes, 16 de diciembre de 2008

Cambiar la plantilla de un BLOG sin perder todos tus WIDGETS

Da mucha pereza cambiar la plantilla de un blog hecho y derecho si uno piensa que tiene que volver a meter todos aquellos widgets y modificaciones. Sin embargo con un poco de orden y procedimiento es posible hacerlo sin riesgo de perder nada.



Hacer copia de seguridad de la plantilla ORIGINAL del Blog
Parece de sentido comun, por si acaso algo va mal.

Abrir tu editor de plantillas
En nuestro caso, SCITE que reesulta muy practico para manejar XML. Abrimos la plantilla original y la plantilla nueva en nuesto editor. Tendremos que copiar bloques enteros de codigo y pegarlos en la nueva plantilla.

Encontrando el código a copiar
La etiqueta <body> marca la frontera, por encima de ella el código es básicamente CSS, que controla la apariencia (colores, fonts) del blog. NO necesitamos esta sección. (pero ojo que habrá que revisarlo pues puede ser necesario traspasar algo.
Lo que está debajo de <body> es el cuerpo principal XML que controla la estructura (layout) y el flujo de datos desde Blogger hasta tu blog. Aqui es donde se encuentra todo el código correspondiente a los Widgets que queremos traspasar.

Todos los widgets se encuentran entre los tag <b:widget> ... </b:widget>. Todos los <b:widget> se encontrarán dentro de la etiqueta <b:section> ... </b:section> tag. La estructura será algo parecido a:

<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' showaddelement='no'>
<b:widget id='LinkList1' locked='true' title='Linkbar' type='LinkList'>

...
... más código ...
...
</b:widget>
<b:widget id='HTML1' .....;

...
</b:widget>
<b:widget id='Image1' .....;

...
</b:widget>
</b:section>
</div>



Este es un ejemplo de cómo aparecen los widgets dentro de la estructura típica de una pplantilla XML. La etiqueta div id The main location of the widget is identified with the div id label. In this case, div id=sidebar-wrapper. Below the div id is the b:section tag. All widgets must be located within this b:section tag. You don't need to worry if you don't understand much about the div or b:section thingy. The important tag you have to know is the b:widget tag. Note that you can put as many widgets as you want inside the b:section tags.

Here's an actual example of a widget tag embedded inside a b:section tag. The location is sidebar-wrapper, meaning that the widget is placed inside one of the sidebars in the blog. The widget is an image widget, as you can see it being labeled id='Image1'.

The most important thing to note is that the widget code starts with the <b:widget> tag and closed with the </b:widget> tag. This is the single most important thing you have to know when copying/pasting later on.Remember also that the widget is placed after the <b:section> tag and closed with the </b:section> tag.

Here's another example. The widget is a Linklist widget. You don't have to know the codes inside the widget tag because you won't have to change anything in there.


Pero vamos al caso concreto

Justo después de <head>


Entre </head> y <body>

0 comentarios:

Publicar un comentario

  © Blogger template Newspaper III by Ourblogtemplates.com 2008

Back to TOP