Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-12-06 14:58:43

pierlu
Member
Registered: 2014-08-12
Posts: 153

article body and excerpt

Hi I have an article with the body and the summary I would like to appear in both site I tried writing in the template like this:

<div class = "article-itin">
  <div class = "article-bodyexc">
    <txp: if_excerpt>
      <txp: excerpt />
    </ txp: if_excerpt>
  </ div>
</ div>

<div class = "article-itin2">
  <txp: body />
</ div>

thanks for your help

{Corrected typo in title to make it findable. – Uli}

Last edited by uli (2014-12-08 13:40:46)

Offline

#2 2014-12-06 15:27:43

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: article body and excerpt

Too many spaces.

<txp:if_excerpt>
  <div class="article-itin">
    <div class="article-bodyexc">
      <txp:excerpt />
    </div>
  </div>
</txp:if_excerpt>

<div class="article-itin2">
  <txp:body />
</div>

Offline

#3 2014-12-07 20:28:19

pierlu
Member
Registered: 2014-08-12
Posts: 153

Re: article body and excerpt

it is possible for each item having 2 excerpt?

Offline

#4 2014-12-08 00:56:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: article body and excerpt

There is only one excerpt field, but if your second excerpt is short enough (not over 256 characters) you can use a custom field.
Or else write the excerpt as the first paragraph of the article body, and then use the plugin rss_auto_excerpt to display it.

Offline

Board footer

Powered by FluxBB