Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-09 09:29:22

Sootah
Member
Registered: 2006-05-04
Posts: 27

If/Else statement?

<code><txp:if_section name=“news”>

<txp:body />

</txp:if_section>

<txp:if_section name=“FAQ”>

<txp:body />

<txp:else />

<txp:beginning length=“350” format=“inside” linktext=“Read More” styleclass=“morelink” cfield=“continue” />

</txp:if_section></code>

I need it so that if it’s sections “news” or “FAQ” it just displays the whole contents of the articles posted in there. Otherwise, it will use the excerpt plugin.

If I only do an if/else it works, but I need the two conditions and THEN the else.

Offline

#2 2006-05-09 09:41:18

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: If/Else statement?

Try this:

<code>
<txp:if_section name=“news,FAQ”>

<txp:body />

<txp:else />

<txp:beginning length=“350” format=“inside” linktext=“Read More” styleclass=“morelink” cfield=“continue” />

</txp:if_section>
</code>

Offline

#3 2006-05-09 09:42:49

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

Re: If/Else statement?

txp:if_section at textbook will solve your problem

too quick for me P (mental note to myself to not watch tv when posting reply)

Last edited by april19 (2006-05-09 09:45:31)

Offline

Board footer

Powered by FluxBB