Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-02-06 04:06:44
- neptho
- Member
- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 48
<txp:posted> works in form, but not in page?
Pardon me if this is a ‘known’ problem, or even by design. I’m still fairly new to the Textpattern game, having finally mastered it well enough to bring it into a “beta” production state.
I’ve got a rather bizarre issue with <txp:posted>, which seems to be a global issue, as it affects ob1_modified, zem_posted, and even a couple things I tried by hand.
I am using TextPattern 4.0.3, and the Connections theme port as a base for my site. In my “archive” page, I have a snippit which is supposed to return the date of the article’s entry.
In the form (archive),
…< p class=“post-date”>< txp:posted />< /p>….
Works perfectly.
However, in the archive page:
…< txp:posted />…
… invariably returns today’s date. Figuring it may be a bug, I tried zem_posted (easier to read that small code snippit, to be honest) It seems that <txp:posted> is not going to work in a page. Does anyone know of a workaround for this, other than inline PHP to do an SQL call? Is there a variable available within the page I may just strftime()?
Thanks.
[Edit: As seen in the demo this seems to be the default behavior.]
Last edited by neptho (2006-02-06 07:34:25)
Offline
#2 2006-02-06 07:49:14
- neptho
- Member
- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 48
Re: <txp:posted> works in form, but not in page?
Well, I can ALMOST get what I want. Looking at the globals, I can use:
strftime(“%a, %b %e, %Y”,$GLOBALS[‘prev_posted’]);
to get the date for the previous post’s entry.. I’m a bit surprised that I can’t find anything resembling time_t in a dump of the registered globals.Last edited by neptho (2006-02-06 07:51:19)
Offline
#3 2006-02-07 04:54:56
- neptho
- Member
- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 48
Re: <txp:posted> works in form, but not in page?
I’d like confirmation that <txp: posted /> is not available in the context of a page, but only within the form – and I’m wondering, if I set format for utime, how can I pass it as a variable to the page?
Offline