Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] bas_if_excerpt

#1 2005-03-12 14:29:48

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

[archived] bas_if_excerpt

Notice: This thread is archived, there is a native txp tag now <txp:if_excerpt>.

**********************************************************

Like I understood the <txp:article_custom excerpted="y" /> it returns only those articles width have excerpts and ignores the others.

But I want an article like this:
txp:excerpts for those articles which have excerpts and txp:body for articles without excerpts.

So I did this little plugin:

Download : bas_if_excerpt

This plugin gives you two more conditional tags:

<txp:bas_if_excerpt>
<txp:bas_if_no_excerpt>

I use them like this
<pre>
&lt;txp:if_article_list&gt;<br /> &lt;h2&gt;&lt;txp:title /&gt;&lt;/h2&gt;<br /> &lt;txp:bas_if_excerpt&gt;<br /> &lt;txp:excerpt /&gt;<br /> &lt;txp:permlink&gt; read more&lt;/txp:permlink&gt;<br /> &lt;/txp:bas_if_excerpt&gt;<br /> &lt;txp:bas_if_no_excerpt&gt;<br /> &lt;txp:body /&gt;<br /> &lt;/txp:bas_if_no_excerpt&gt;<br />
&lt;/txp:if_article_list&gt;<br />
</pre>

Last edited by Bastian (2005-03-12 14:33:39)

Offline

  1. Index
  2. » Archives
  3. » [archived] bas_if_excerpt

Board footer

Powered by FluxBB