txp:excerpt

The excerpt tag is a Single Tag. Which is used to return the excerpt text, if any, associated with the article being displayed. This tag is used in an article form.

Syntax

The excerpt tag has the following syntactic structure…

<txp:excerpt />

Attributes

There are no attributes associated with excerpt.

Examples

Excerpt and read more button

This example explains how you could display the excerpt in an article list, and excerpt + body in an individual article. Use the following in an article form:

<txp:if_article_list>
 
	<txp:if_excerpt>
		<txp:excerpt />
 
		<p class="read-more><a href="<txp:permlink />#body" title="<txp:title />">&amp;#187; Read more</a></p>
	<txp:else />
		<txp:body />
	</txp:if_excerpt>
 
<txp:else />
 
	<txp:if_excerpt>
		<txp:excerpt />
	</txp:if_excerpt>
 
	<div id="body">
		<txp:body />
	</div>
 
</txp:if_article_list>

Other tags used: <body />, <if_article_list>, <if_excerpt>, <permlink>, <title />

Display the excerpt text or a default link

Use the following within an article form:

<txp:if_excerpt>
	<txp:excerpt />
<txp:else />
	<p>Section: <txp:section title="1" link="1" /></p>
</txp:if_excerpt>

Other tags used: <if_excerpt>, <section />

txp/excerpt.txt · Last modified: 2008/02/05 15:03 by hcgtv

Home Page | User Forums | Driven by DokuWiki
Copyright © 2008 xPattern