Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-04-05 18:23:01
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Override Date Display?
Hello, does anyone know of a way I could override the date displayed for an article, perhaps with an “if” tag and a custom field? I want to put a date range on one of my articles (ie April 6-10, 2006), but I’m not having any luck finding reference to this on the forum. Any help appreciated.
Thanks – Jesse
Offline
#2 2006-04-05 18:32:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Override Date Display?
You can’t use the posted field for that, but what you could do is put that in a custom field, create a new article form with <txp:custom_field name="..." />
instead of <txp:posted />
, and use ‘override form’ (advanced options) for this article. You can enter the first or the last date of the range in the posted field, so that it will be sorted correctly.
Offline
#3 2006-04-05 18:37:14
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Re: Override Date Display?
Els wrote:
You can’t use the posted field for that, but what you could do is put that in a custom field, create a new article form with
<txp:custom_field name="..." />
instead of<txp:posted />
, and use ‘override form’ (advanced options) for this article. You can enter the first or the last date of the range in the posted field, so that it will be sorted correctly.
Thanks Els, that will work great for the article, however I forgot to mention the most important part – I need the date to show this range when using rss_suparchive for my sidebar events list… So unless I can somehow change the date code in TXP, I’m guessing I would need to modify the plugin code with some sort of if/else statement?
Offline
#4 2006-04-05 18:46:55
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Override Date Display?
Something like that I suppose. But I wouldn’t know, you’d better ask in the plugin thread. If you will be using date ranges more frequently you might want to have a look at jmc_event_manager.
Offline
#5 2006-04-05 18:50:50
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Re: Override Date Display?
Els wrote:
Something like that I suppose. But I wouldn’t know, you’d better ask in the plugin thread. If you will be using date ranges more frequently you might want to have a look at jmc_event_manager.
Ok good to know, thanks again Els. I think I might have to implement the jmc plugin.
Offline
Re: Override Date Display?
Hi,
Like Els says it’s indeed a plugin topic but just want to let you know that it can be done with the rss_suparchive plugin. Do something like this:
<code><txp:rss_suparchive category=“agenda” timeframe=“FUTURE” limit=“8” form=“lofi” /></code>
And in the form:
<code><div class=“rssSubdate”><txp:posted format=”%d %B or any other php format” />
<li class=“rssArticle”><txp:permlink><txp:title /></txp:permlink></li></div></code>
cheers,
Maarten
Offline
#7 2006-04-06 17:57:24
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Re: Override Date Display?
maarten that is perfect, with your help I figured it out. Thanks!!
Offline
Pages: 1