Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
REQ: article posted="today" ???
I wish, that both txp:article and txp:article_custom
would be able to have their posted attribute set to “today”
- regardless of the current hour actually.
Last edited by jayrope (2023-02-20 15:46:36)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: REQ: article posted="today" ???
would this work for you?
<txp:variable name="posted-day"><txp:php>echo safe_strftime("%b %d, %Y");</txp:php></txp:variable>
<txp:if_variable name="posted-day" value='<txp:posted format="%b %d, %Y" />'>
<txp:posted />
<txp:else />
Today
</txp:if_variable>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: REQ: article posted="today" ???
Try also this:
<txp:article month="today" time="%Y-%m-%d" />
Offline
Re: REQ: article posted="today" ???
Thank you very much, Yannis and etc.
I went with etcs method. It does work here with an article_custom tag.
But why and how exactly?
The txp tag docs don’t give me any clue there…
A hole turned upside down is a dome, when there’s also gravity.
Offline
Offline