Listing of all your posts in chronological order  

Today I will share with you a simple hack which allows you to have a listing of all your posts in chronological order. Think of it as the default "Blog Archive" widget without the hassle of opening and/or showing the arrow buttons. This hack is different from my other "Table Of Contents" hack in which it creates all entries by itself, without the help of another widget.

The reason I want to share this hack first, is because it forms the base of my other hack "Related Articles" that I will show you in a very near future as well.

To install this hack is very simple. First, follow the instructions from this article Hacking Technique: How To Modify a (Beta) Template, in particular section B.4. Then cut this code below and paste it in between any two "b:widget" tags, save the template, and you're done.


<b:widget id='BlogArchive3' locked='false' title='Contents' type='BlogArchive'>
<b:includable id='main'>
  <b:if cond='data:title'>
    <h2><data:title/></h2>
  </b:if>
  <div class='widget-content'>
  <div id='contents'>
    <b:if cond='data:style == "HIERARCHY"'>
     <ul id='contentData'><b:include data='data' name='interval'/></ul>
    </b:if>
  </div>
  <b:include name='quickedit'/>
  </div>
</b:includable>
<b:includable id='posts' var='posts'>
  <b:loop values='data:posts' var='i'>
    <li><a expr:href='data:i.url'><data:i.title/></a></li>
  </b:loop>
</b:includable>
<b:includable id='interval' var='intervalData'>
  <b:loop values='data:intervalData' var='i'>
    <b:if cond='data:i.data'>
      <b:include data='i.data' name='interval'/>
    </b:if>
    <b:if cond='data:i.posts'>
      <b:include data='i.posts' name='posts'/>
    </b:if>
  </b:loop>
</b:includable>
</b:widget>


Here is the result, I currently install it on my blog for a week or so for you to see.



Stay tuned for my next hack, showing "related" articles which share the same topic titles such as "hacking technique", "custom widget", etc. (as you currently see in my blog while viewing individual articles.)



Cheers,

Hoctro