Inside Paulo Abrantes' head
[ start | index | login or register ]
start > 2006-05-23 > 1

YASM: Yet Another SnipSnap Macro

Created by pabrantes. Last edited by pabrantes, 2 years and 137 days ago. Viewed 1,543 times. #5
[diff] [history] [edit] [rdf]
labels
attachments

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:

  1. {latestPosts}: Renders the last 10 Snips from weblog snip start
  2. {latestPosts:name=xpto|number=15} Renders the last 15 snips from weblog snip xpto
  3. {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.

Please login to www.pabrantes.net.
Who am I?
paulo-roca2My name is Paulo Abrantes AKA pabrantes and I'm a software developer. I'm currently employed at >>CIIST working as a Java developer in >>FenixEDU.

This blog is mostly about Java programming, domain driven design and snipsnap bliki developing. Everything written in this blog is my personal opinion and it may not reflect the opinions of my employer and co-workers.


Blog subscription
subscribe by rss subscribe by email

Links
>> Home
>> Paulo's Profile
>> Post History
>> Add to Technorati Favorites
>> Paulo's Photo Gallery
>> WishList
>> Posting without Login

Search Blog
Fellow Bloggers

Recent Posts

Java Programming: Bytecode Injection
Intermission: Sorry For Downtime
Software Developing: Studying The Bliki Domain Model
SnipSnap Developing: Trying to settle a roadmap
System Administration: Load Balancing with Apache
Blogging: Two years have passed
Software Developing: The SnipSnap Saga
Java Programming: Getting your code spicy with Groovy
Software Developing: Fluent Interfaces
Software Developing: Implementing a ShoutBox on SnipsSnip
Software Developing: SnipSnap, SnipIt and SnipSnip
Java Programming: Proxies and Access Control
Java Programming: Proxies and References
Java Programming: References' Package
YALM: Yet Another Layout Modification

For older posts, please refer to post-history for a complete Post History

Logged in Users: (0)
… and 4 Guests.
This is a modified version of snipsnap.org created by >>Paulo Abrantes