Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-25 13:29:15

ss19
New Member
Registered: 2007-02-12
Posts: 7

Display date on which the article was last updated

I am displaying a list of articles in a section page. The idea was to display the article name and the date on which it was updated. Artilces do not change. More content is added to them. So, I needed to display the date on which it was modified.

It seems that txp:posted displays the date on which the article ws originally created ?

This is the Page used to list the articles:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head> <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />

<title><txp:page_title /></title> <txp:css format=“link” />

</head>
<body>

<!— accessibility —>

<div id=“container”>

<!— head —> <div id=“head”> <h3><txp:link_to_home><txp:sitename /> : <txp:section title=“1” /></txp:link_to_home></h3>
<h3>Click on the individual name for more details.</h3>

</div>

<!— left —>

<!— right —>

<!— center —>

<div id=“first”><txp:article allowoverride=“0” form=“default” pageby=“10” limit=“20” listform=“Excerpts” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” /></div>

<!— footer —> <div id=“foot”>&nbsp;</div>

</div>
====================================================
default form looks like this:
<h3><txp:permlink><txp:title /></txp:permlink> · <txp:posted /></h3>

<txp:body />

<p>— <txp:author /></p>

<txp:comments_invite wraptag=“p” />

<div><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” class=“divider” alt=”—-” title=”“ /></div>
====================================================

Is there some way to capture the last updated date for an article ?

Thanks,

SS

Last edited by ss19 (2007-02-25 13:30:07)

Offline

#2 2007-02-25 13:53:35

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: Display date on which the article was last updated


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#3 2007-02-25 16:36:17

ss19
New Member
Registered: 2007-02-12
Posts: 7

Re: Display date on which the article was last updated

Thanks. The plugin worked. Is it also possble to sort the list of articles on the plugin field ?

Offline

#4 2007-02-25 16:58:13

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Display date on which the article was last updated

You can sort on the last modified date by setting the ‘sort’ attribute (sort="LastMod ASC" or sort="LastMod DESC") in the article or article_custom tag.

Last edited by ruud (2007-02-25 16:59:11)

Offline

#5 2007-02-26 02:44:20

ss19
New Member
Registered: 2007-02-12
Posts: 7

Re: Display date on which the article was last updated

More thanks. I am able to sort and get a list of articles on last updated.

Cheers.

Offline

Board footer

Powered by FluxBB