The Remaking of Version 3

10 March 2007

It takes a certain amount of obsessive compulsion, I think, to be good at what you do. This thing called the internets is what I do – and believe you me, I’m obsessed. Not more than a day after I launched Version 3 of this site I began revamping the way the site displays blog entries.

Now, instead of using the direct query method I showed previously, I use an entirely separate blog for links. Not only does this simplify my homepage code and reduce the amount of database queries, it also allows me to more easily manage the entries; where and how they’re displayed.

This is made possible by EE’s support for multiple weblogs inside one exp:weblog:entries tag. So this:

  1. {exp:weblog:entries weblog="blog" limit="20" paginate="bottom"}

Becomes this:

  1. {exp:weblog:entries weblog="blog|quickblog" limit="20" paginate="bottom"}

Another benefit of using this method is that I can now use the auxiliary “quickblog” for more than just links. Every category is now available to me – so if I have a quick thought about, say, design, I can just post it in the design category and not worry that it’s being displayed as a major article.

Additionally, the separation of quick-natured blog posts from those that require more attention (and time to read) creates an opportunity for isolating them in aggregation, for example, in an RSS feed.

For those wondering, yes, this is very much like a tumblelog. In fact, I’m experimenting with Andrew Weaver’s sweet, new FeedGrab plugin in order to pull in my Ma.gnolia links, Twitter statuses, Flickr photos, and Newsvine seeds. We’ll see how that goes.

Howsit done?

So here’s my new homepage code:

  1. {exp:weblog:entries weblog="seanblog|quickblog" limit="20" paginate="bottom"}
  2. {if weblog_id != "8"}
  3. <div class="link">
  4. {exp:markypants}{summary}{/exp:markypants}
  5. <h6><a href="{url_title_path=entry}">&raquo;</a></h6>
  6. {if:else}<div class="post">
  7. <h2><em>{entry_date format="%M %j%S"} </em><a href="{url_title_path=entry}">{title}</a></h2>
  8. {exp:markypants}{summary}{/exp:markypants}
  9. {if body}{exp:markypants}{body}{/exp:markypants}{/if}
  10. <h6 class="post-links"><a href="{url_title_path=entry}#comments">{comment_total} comment{if comment_total != '1'}s{/if}</a><span> | </span><a href="{url_title_path=entry}">permalink</a></h6>
  11. {/if}</div>

You can see I’m able to pull entries from two different weblogs using the same {exp:weblog:entries} tag. I just separate each using the pipe character. Then I use the weblog_id for the conditional and display entries uniquely based on which blog they came from, regardless of category. Again, this allows me to quickly post a thought, image, quote or link in the “quickblog” without it being displayed as a full-fledged post.

Questions, comments, concerns?