Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Trouble with Txp:posted
Hi to you all out here,
Maybe some can help me with the following riddle:
On one single page the tag Txp:posted is called twice:
+ once through the Single form like in <txp:article form=“Single” />
+ and once directly via Txp:posted
The first “call” gives the correct date, being the date/time the article was posted. However, and that’s my riddle, the second one gives the current date/time. Isn’t that strange?
Is this a bug? I searched the bug list but could not find anything.
Many thanks in advance for helping me!
Best regards,
Marcel
Offline
Offline
#3 2006-09-24 21:28:29
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Trouble with Txp:posted
zeeforel wrote:
On one single page the tag Txp:posted is called twice:
+ once through the Single form like in<txp:article form="Single" />
+ and once directly via Txp:posted
Where is that second <txp:posted /> tag?
Last edited by els (2006-09-24 21:28:45)
Offline
Re: Trouble with Txp:posted
txp:posted returns the current time if it is mistakenly used outside of an article context (this is a side effect of how txp:posted accounts for DST settings).
Txp 4.0.4 issues a warning whenever article related tags are used without a proper context, Txp 4.0.3 holds its tongue.
Offline
Re: Trouble with Txp:posted
Thanks to all people reacting to my question so far.
I think that the pointer of Wet describes exactly what is happening. The archive page template calls <txp:article form=“Single” />, in which the Single form produces the correct outcome for the date, while at the same time on the archive page txp:posted is called outside the article context.
So what can I do? Two options:
+ delete the second one (breaking my design)
+ or bring the second one into the Single form..
Still need to figure this one out. I thought just using a prefab template (http://erraticwisdom.com/demo/connections/) would be easy….
Thanks again.
Offline
Pages: 1