Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-30 23:26:53

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

<txp:if_no_results> & <txp:if_status status="future">

I Googled for them, I searched this forum for them, but couldn’t find anything like them.

Here’s the thing: I have a site that displays events. When there are no upcoming events ( status="future" ), I want to display a message, saying there aren’t any events planned.

Second problem: If an event has status="future", I would like it to display a simple link through which people can subscribe for the event ( <txp:if_status status="future"> )


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

#2 2008-09-30 23:51:52

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: <txp:if_no_results> & <txp:if_status status="future">

txp:if_status is for the pages HTTP status, not the article status. Maybe you could take a look at wet_if_status although it doesn’t appear to deal with future.

smd_if may be the way to go.

Last edited by MattD (2008-09-30 23:53:33)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2008-10-01 07:17:44

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,186
Website

Re: <txp:if_no_results> & <txp:if_status status="future">

… or possibly chh_if_data.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2008-10-01 08:46:07

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

Re: <txp:if_no_results> & <txp:if_status status="future">

@Jakob: Thanks for chh_if_data! I’ve found another solution (though a very specific one, and probable only useful in my case): I’ve created a new article in the section, set the year of that article to 2035 and gave it another form. I also set the limit for upcoming events to 1, so it’ll only show the next upcoming event (and not all of them). If there are no events upcoming, it displays the post from 2035.


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

Board footer

Powered by FluxBB