Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Tag for most recent modified date?
I’m trying to output a custom XML feed using a textpattern page / article templates. The only barrier I’ve bumped into is I need the most recent modified date for the article list being rendered. Has anyone by any chance built a plugin for that? I searched and couldn’t find anything.
I like the formatting flexibility of upm_datetime, but need a tag that will output the most recent modified time for the current list of articles.
Offline
Re: Tag for most recent modified date?
Could you use the last modified date of the latest article?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Tag for most recent modified date?
Interesting idea… I’m using article_custom to output my articles, I’ll try doing it twice on my page, the first time sorted by date descending limit of 1 and use that article’s modifed date.
Offline
Re: Tag for most recent modified date?
Yep, that worked great !
<txp:article_custom limit=“1” section=“products” sort=“LastMod desc”><txp:modified format=“iso8601”/></txp:article_custom>
Offline
Re: Tag for most recent modified date?
There’s probably some way to avoid the double query but I can’t think of it. Somethings in the back of my mind says there’s something by Bloke that gathers data before rendering the page which you’d need to do to get it all together with the one article_custom.
But since your extra query is only for one article…
Last edited by MattD (2012-01-12 07:09:43)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Pages: 1