Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Need a little help.
I have a section named “promo”. I publish an article for this section in future time. Now, I want to display on my “default” page <strong>only one</strong> article (like a banner ad) : the promo section’s article <strong>only if</strong> the publishing date is future and else an another article (a static one attached to the section “article”)… But I can’t find the way (I think I’ve lost my mind :-)
Could you help me. Tks lot.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#2 2006-07-12 21:13:51
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Need a little help.
Okay, this works (I tried). Get chh_if_data.
Use this code:
<code>
<txp:chh_if_data>
<txp:article time=“future” />
<txp:else />
your article tag for when there is no future article
</txp:chh_if_data>
</code>
(I just noticed that when I create a new article, change the date to a future one, and publish it, it is published with today’s date and time. Saving it again is needed to actually change the date. Strange…)
Offline
Re: Need a little help.
Great! Ths Els. Very Good.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1