Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-07-10 08:08:33

[Axel]
Member
From: Switzerland/Denmark
Registered: 2007-07-26
Posts: 65
Website

Re: I have an event page, and need the current event at top of the list

You made my Day… THX a lot!!!

here is the code I use now, and it works like a charm.

<txp:variable name="current" value="0" />
<txp:variable name="upcoming" value="0" />
<txp:variable name="past" value="0" />
<txp:article_custom section="events" expired="0" limit="999">
	<txp:if_expires>
		<txp:if_variable name="current" value="0">
			<h4>##enl_current##</h4>
			<txp:variable name="current" value="1" />
		</txp:if_variable>
		<txp:output_form form="events" />
	</txp:if_expires>
</txp:article_custom>
<txp:article_custom section="events" limit="6" time="future" sort="posted asc">
	<txp:if_expires>
		<txp:if_variable name="upcoming" value="0">
			<h4>##enl_upcoming##</h4>
			<txp:variable name="upcoming" value="1" />
		</txp:if_variable>
		<txp:output_form form="events" />
	</txp:if_expires>
</txp:article_custom>
<br/><br/>
<txp:article_custom section="events" expired="1" limit="999">
	<txp:if_expired>
		<txp:if_variable name="past" value="0">
			<h4>##enl_past##</h4>
			<txp:variable name="past" value="1" />
		</txp:if_variable>
		<txp:output_form form="events" />
	</txp:if_expired>
</txp:article_custom>

Greetz [Axel]

Offline

Board footer

Powered by FluxBB