YASM: Yet Another SnipSnap Macro 
Well I've written another Snipsnap macro, this time is called
latestPosts and the objective is to show the latest N posts from a given weblog Snip.
You maybe haven't noticed before, but in the Recent Posts list it used to be displayed using my website RSS feed - using my FeedReader Macro.
But this was generating a problem. Each time someone was accessing the blog, my server would generate a request to himself asking for the RSS...Has you can imagine my server logs were getting big, that's not nice for me!
So my idea was to get the posts from within the snipsnap architecture. Since the g Snipsnap's developers did a really good design it was pretty simple to do this macro. There's only one problem in my opinion… No method to get the post's subject is implemented, you have to access the post content and parse the title out of it, simple job but it would be a lot nicer if there was just the method.
Anyway feel free to use
my latestPosts macro.
Here's the syntax:
- {latestPosts}: Renders the last 10 Snips from weblog snip start
- {latestPosts:name=xpto|number=15} Renders the last 15 snips from weblog snip xpto
- {latestPosts:number=15} Renders the last 15 snips from the weblog snip start
Live example:
{latestPosts:number=3} will show:
Java Programming: Bytecode Injection Intermission: Sorry For Downtime Software Developing: Studying The Bliki Domain Model Questions and comments related to this macro post or send an email.
This file is also available at my
file vault.