Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Simple excerpt question.
I have the following code in my default form which has a number of class styles assigned. Right now, I have my page template calling this form which in turn displays 7 max articles in full (no excerpts).
I would like to use excerpts but am unsure how to modify this template to allow me to do so. Every time I have tried, I’ve ended up breaking something. Can someone please assist?
Code in my form at the moment is this:
<div class="post">
<div class="title">
<h2><txp:permlink><txp:title /></txp:permlink></h2>
</div>
<div class="entry">
<txp:body />
</div><!-- end .entry -->
<div class="postdata">
Posted in <txp:category1 link=1 title=1 /> at <txp:posted />. <a href="<txp:permlink />#comment"><txp:comments_count /> Comments</a>.<br />
<txp:if_individual_article>
<txp:if_plugin name="tru_tags"><txp:tru_tags_if_has_tags>Tags: <txp:tru_tags_from_article /></txp:tru_tags_if_has_tags></txp:if_plugin>
</txp:if_individual_article>
</div>
</div><!-- end .post -->
<txp:if_individual_article>
<txp:if_plugin name="tru_tags"><div class="post" id="related"><txp:related_articles label="Related Articles" Labeltag="h3" wraptag="ul" break="li" /></div></txp:if_plugin>
</txp:if_individual_article>
Offline
Re: Simple excerpt question.
Simply place <txp:excerpt />
where you want the excerpt to appear. You’re getting the full post because of the <txp:body />
tag in the form.
Code is topiary
Offline
Re: Simple excerpt question.
Ok. I’ve add excerpt, and now if I click on the title of the post, I get the excerpt with comments.
Getting confused here.
Offline
Re: Simple excerpt question.
Do you have Automatically Append Comments to Articles set? That is the default value, and would explain why you are seeing comments when in individual article context (i.e., after clicking on an article title) even if there is no <txp:comments />
tag in your article form.
Code is topiary
Offline
Re: Simple excerpt question.
I have resolved. Thanks.
Offline
Pages: 1