Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-12 10:49:05

stevieg_83
Member
From: Glasgow, UK
Registered: 2009-07-24
Posts: 14
Website

rss_auto_excerpt help

I want to restrict the number of words displayed in an article on my homepage.

I’ve got my form containing

bq..
<txp:article_image thumbnail=“0” /> <h3>MY BLOG</h3>
<txp:if_individual_article>
<h4><txp:permlink><txp:title /></txp:permlink></h4>
<txp:else />
<h4><txp:permlink><txp:title /></txp:permlink></h4>
</txp:if_individual_article>
<txp:body />
<txp:rss_auto_excerpt words=“50” />

but that’s not working – to be honest that doesn’t even look right to me. Should that tag be contained on my article form or on my actual page?

Offline

#2 2009-08-12 12:56:24

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

Re: rss_auto_excerpt help

I guess you want the article body for individual articles, and else, display the excerpt. Everything inside the “if” tag then:

<txp:if_individual_article>
    <h4><txp:permlink><txp:title /></txp:permlink></h4>
    <txp:body />
<txp:else />
    <h4><txp:permlink><txp:title /></txp:permlink></h4>
    <txp:rss_auto_excerpt words=“50” />
</txp:if_individual_article>

Edit:

and the h4 doesn’t need to be inside the conditional:

<h4><txp:permlink><txp:title /></txp:permlink></h4>
<txp:if_individual_article>
    <txp:body />
<txp:else />
    <txp:rss_auto_excerpt words=“50” />
</txp:if_individual_article>

Does that help?

Last edited by PascalL (2009-08-12 21:52:28)

Offline

Board footer

Powered by FluxBB