Last Entry is a small plugin to get the entry date of the last entry in one or more weblogs.
Usage:
{exp:last_entry weblogs='news|blogs|videos' format='%Y-%m-%d'}This would search through the news, blogs and videos weblogs and find the date of the latest entry. This could output 2010-01-18 for instance. The format parameter decides the date format and works the usual way. It only uses one SQL query so I would imagine that it’s faster than the alternative (that would be to use the {exp:weblog:entries} tag).
If you’d like to find future entries as well add “allow_future_entries=’yes’” to the syntax above.
It can also be used in other tags like this:
{exp:weblog:entries weblog="{my_weblog}" start_on="{exp:last_entry weblogs='news|blogs|videos'
format='%Y-%m-%d'} 12:01 AM" stop_before="{exp:last_entry
weblogs='news|blogs|videos' format='%Y-%m-%d'} 11:59 PM"
disable="categories|category_fields|member_data|pagination|trackbacks"
parse="inward" }Note it would probably be better to use embed here to only run the last_entry query once, this is just for example purposes.
Enjoy, and ask here if you have any questions.
Download from github: http://github.com/bjornbjorn/Last-Entry/zipball/master
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.