Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-01-11 23:04:40

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

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

#2 2012-01-11 23:22:35

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Tag for most recent modified date?

Could you use the last modified date of the latest article?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2012-01-12 01:25:18

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

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

#4 2012-01-12 01:32:37

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

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

#5 2012-01-12 07:09:09

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB