Eating your own dogfood
In reworking my site over the last week or so, I have managed to come up with some fancy new features for the next version of MultiBlog, mostly involving offset handling in the MultiBlogEntries tag.
You can now specify to which blogs the offset value is applied. Normally, with offset, the MultiBlogEntries tag will simply skip that number of entries. Now, if offset_local_only is set in addition to an offset value, only entries in the local blog (i.e. the blog in which the template is building) will be skipped. If offset_all_blogs is set, all of the blogs included will have offset number of entries skipped. And finally, offset_blogs can be used to indicate which blogs should have their entries skipped.
For example, I initially decided to display the latest entry in full from my main blog, followed by Google ads and then the rest of the entry list built from my blog and my wife's blog.
<!-- Latest entry from my blog -->
<MTEntries lastn="1">
<!-- Display entry here... -->
</MTEntries>
<!-- Google ad code here... -->
<!-- Display the rest of the latest entries from my blog and my wife's blog,
making sure to exclude the latest entry from my blog only -->
<MTMultiBlogEntries lastn="12" include_blogs="2,16" offset="1" offset_local_only="1">
<!-- Entry display stuff here... -->
</MTMultiBlogEntries>
Then, since I have decided to fork my blog into plugins and personal blogs, I thought I would display the latest entry in both of those along with the latest entry from my wife's blog, followed by the rest of the latest entries, making sure to exclude the entries displayed previously. (Also of note is the change in the MultiBlog tag that preserves the ordering of the blog_ids passed to it)
<!-- Latest entry from all the blogs -->
<MTMultiBlog include_blogs="24,2,16">
<!-- Get the latest entry for the current blog in the loop -->
<MTEntries lastn="1">
<!-- Display entry here... -->
</MTEntries>
</MTMultiBlog>
<!-- Google ad code here... -->
<!-- Display the rest of the latest entries from my blogs and my wife's blog,
making sure to exclude the latest entry from each blog -->
<MTMultiBlogEntries lastn="12" include_blogs="2,16,24" offset="1" offset_all_blogs="1">
<!-- Entry display stuff here... -->
</MTMultiBlogEntries>
Then I remembered that my wife prefers that I do not post any of her entries in their entirety on my page, so I would need to remove her blog from the first portion and make sure that her blog is not offset in the second portion.
<!-- Latest entry from all my blogs -->
<MTMultiBlog include_blogs="24,2">
<!-- Get the latest entry for the current blog in the loop -->
<MTEntries lastn="1">
<!-- Display entry here... -->
</MTEntries>
</MTMultiBlog>
<!-- Google ad code here... -->
<!-- Display the rest of the latest entries from my blogs and my wife's blog,
making sure to exclude the latest entry from each blog -->
<MTMultiBlogEntries lastn="12" include_blogs="2,16,24" offset="1" offset_blogs="2,24">
<!-- Entry display stuff here... -->
</MTMultiBlogEntries>