Tuesday, June 3, 2008

Blog Widget - Part 1

The Blog Widget is the most important widget in Blogger. It contains the core content of a blog including its posts, comments, back links and feed links. In other words, this is what defines the composition of the main column of a Blogger blog.

Knowing the finer points of the Blog widget is very valuable to any Blogger user. Since it is so important, I'm going to explain this widget over several articles. This is the first part of a multi part article series on the Blog widget.

As with any widget, the Blog widget also has a primary <b:includable> section with an id='main'. However, it also contains a number of other <b:includable> sections, each serving a valuable purpose. They are:

  • status-message
  • post
  • postQuickEdit
  • comments
  • commentDeleteIcon
  • backlinks
  • backlinkDeleteIcon
  • nextprev
  • feedLinks
  • feedLinksBody
These includables are the building blocks of the Blog widget. If we equate the Blog widget to a car, think of the main includable as the chassis and the others as various components such as the body, engine, seats etc. of that car. The final Blog widget is the result of assembling these includables in a particular order. This hierarchy of assembly is illustrated in the figure below.

At the first level of inclusions in the main section are the status-message, post, comments (only in item pages), nextprev and feedLinks sections. The post section in turn includes the postQuickEdit section. commentDeleteIcon and backlinks sections are contained within the comments section and the backlinks section in turn includes the backlinkDeleteIcon section. Finally, the feedLinks contains the feedLinksBody section.

In the articles to follow, we will probe each of these includable sections one by one.