Textpattern Plugin | rss_posted

Based on an idea from one of my favorite textpatterners I put together an alternative to the standard <txp:posted/> tag. The major addition is that each part of the date (year, month and day) will be hyperlinked.

This can be used to link to an archive or other page that supports filtering by date. Coincidentally, this can be done using the latest version (0.14) of the rss_suparchive and you can see this in use on the posted dates on this site.

Given an example date of March 28, 2005, 3 hyperlinks will be created:

  1. 2005 will be hyperlinked to /section/2005
  2. March will be hyperlinked to /section/2005/03
  3. 28 will be hyperlinked to /section/2005/03/28

Download rss_posted


rss_posted attributes

monthformat
Format for the month part of the posted date. Accepts PHP date format.
Default: ‘F’
Example: monthformat=”m”

dateformat
Format for the day part of the posted date. Accepts PHP date format.
Default: ‘j’
Example: dateformat=”jS”

yearformat
Format for the year part of the posted date. Accepts PHP date format.
Default: ‘Y’
Example: yearformat=”y”

sep1
Text that separates the first and second parts of the posted date.
Default: ’ ’
Example: sep1=”, ”

sep2
Text that separates the second and third parts of the posted date.
Default: ’, ’
Example: sep2=” ”

linktosection
Denotes the section that the category headers will link to when the URL is built.
Default: ‘’
Example: linktosection=”archive”

order
Denotes the order that the date parts will appear. This can be any combination of M, D and Y. The list should be comma separated with NO SPACES.
Default: ‘M,D,Y’
Example: order=”Y,D,M”

Download rss_posted

Comments

29. March 2005

Running very happily at http://12minds.com/. Even if the site itself isn’t yet styled and done up properly, at least the posted dates and archives are linked to each other and running beautifully. thanks Rob :)

Add a comment

You may use textile in your comment. Gravatars are enabled. Your email will not be displayed and will remain private. I reserve the right to edit or delete comments.





Textpattern Solutions

Textpattern Solutions

Textpattern Solutions is the first book published on Textpattern.

details at friends of ED or the official book website.

buy it at amazon.com