Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-03-17 21:54:49
- Zarathu
- Member
- Registered: 2006-08-12
- Posts: 35
Excerpts
How can I use this to make it so that only the excerpt of a certain article is displayed on the page? I want this to occur only when a specific section (we’ll call it “bobsection”) is viewed.
<txp:if_section name=“bobsection”>
<txp:excerpt />
<txp:else />
<txp:article />
</txp:if_section>
That’s what I’ve got so far, but it doesn’t work. I’m assuming <txp:excerpt /> is meant for forms only?
Offline
#2 2007-03-17 22:27:41
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: Excerpts
Make two different forms, one with the excerpt (i), and one (ii) with the other layout. Then on your page place
<txp:if_section name=“bobsection”>
<txp:article form="(i)"/>
<txp:else />
<txp:article form="(ii) />
</txp:if_section>
Regards,
Joey
Offline
#3 2007-03-17 22:32:48
- Zarathu
- Member
- Registered: 2006-08-12
- Posts: 35
Re: Excerpts
Interestingly enough, the excerpt seems to only work with the first one that shows up.
Offline
#4 2007-03-17 22:53:17
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: Excerpts
Can you give the (neccesary) page and form code you have so far?
Regards,
Joey
Offline
#5 2007-03-17 22:55:14
- Zarathu
- Member
- Registered: 2006-08-12
- Posts: 35
Re: Excerpts
Page:
<div id=“main”> <br /><br /><br /> <txp:if_article_list> <p> <txp:newer>Newer</txp:newer> <txp:older>Older</txp:older> </p> </txp:if_article_list> <txp:if_section name=“reviews”> <txp:article form=“excerpt” /> <txp:else /> <txp:article /> </txp:if_section>
</div>
“excerpt” Form:
<p><u><txp:title /></u></p>
<txp:excerpt /><br />
<p align="right"><font size="3"><a href="<txp:permlink />">Continue reading...</a></font></p><br />
Last edited by Zarathu (2007-03-17 22:55:49)
Offline
#6 2007-03-18 20:45:57
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: Excerpts
Hmm, I actually don’t know what went wrong, code looks ok. Somebody else see the problem?
Regards,
Joey
Offline
#7 2007-03-19 21:14:36
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Excerpts
What’s in your default form? Is the code you’ve shared inside any other conditional tags?
Offline