After digging through the Blogger help files I finally figured out what I think is the basics of the structure of a Blogger template. A Blogger template basically consists of regular HTML with special elements which the server will replace with content from the database. I have summarized the basic structure in a set of nested tables to better illustrate what fits where. Each box represents an element that must be put into the template as a unit. Comments about each element are in green under each element.
HTML (Any amount of HTML code of whatever type you like can go here, before the first <b:section> element.)
<b:section …> (one or more)
There can not be any HTML inside a <b:section> or <b:widget> element unless it is inside an <b:includable> element.
More HTML and/or sections.
- You can include as much more HTML and or more <b:section> elements (as defined above) as necessary to complete the design of your template.
- The <b:section> elements can be nested within HTML <div> tags or tables or whatever you prefer to use in order to position the <b:section> elements the way you want on the page.
Naturally, this post is not an attempt to explain everything about how Blogger templates work. However, I have yet to see any other description that lays things out graphically so that it is easy to see the whole thing at a glance. I hope this will be helpful for people who are having trouble putting all the pieces together.
This post is Copyright © 2009 by Grant Sheridan Robertson.