Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-16 14:55:27

hilary
Member
Registered: 2006-09-11
Posts: 37

show the excerpt in article body

Hi guys!

Here is the code from my default form(most recent txp version)
<code>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:if_article_list>

<txp:if_excerpt>
<txp:excerpt />
<p class=“more”><txp:permlink><txp:if_custom_field name=“continue”><txp:custom_field name=“continue” /> <txp:else />read more </txp:if_custom_field></txp:permlink></p>
<txp:else />
<txp:zem_prblock>
<txp:body />
</txp:zem_prblock>
<p class=“more”><txp:comments_invite /></p>
</txp:if_excerpt>
<txp:else />
<txp:body />
</txp:if_article_list>
</code>
Can anyone show me the code to make the excerpt show up on the article body page also, so far everything I tried broke the system!!

Thanks!

Last edited by hilary (2006-10-16 15:02:14)

Offline

#2 2006-10-16 17:54:16

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

Re: show the excerpt in article body

Something like this?
<pre><code>
&lt;h3>&lt;txp:permlink>&lt;txp:title />&lt;/txp:permlink>&lt;/h3>

&lt;txp:if_article_list> &lt;txp:if_excerpt> &lt;txp:excerpt /> &lt;p class=“more”> &lt;txp:permlink> &lt;txp:if_custom_field name=“continue”> &lt;txp:custom_field name=“continue” /> &lt;txp:else /> read more &lt;/txp:if_custom_field> &lt;/txp:permlink> &lt;/p> &lt;txp:else /> &lt;txp:zem_prblock> &lt;txp:body /> &lt;/txp:zem_prblock> &lt;/txp:if_excerpt>
&lt;txp:else /> &lt;txp:body />
&lt;/txp:if_article_list>

&lt;txp:if_individual_article> &lt;txp:excerpt /> &lt;txp:body />
&lt;/txp:if_individual_article>

&lt;p class=“more”>&lt;txp:comments_invite />&lt;/p>
</code></pre>

Last edited by ruud (2006-10-16 18:00:04)

Offline

#3 2006-10-17 09:07:02

hilary
Member
Registered: 2006-09-11
Posts: 37

Re: show the excerpt in article body

That worked!
<code>
<txp:if_individual_article> <txp:excerpt />
</txp:if_individual_article>
</code>
Like that, otherwise the article repeated, great solution though, thanks a million!!!

Offline

Board footer

Powered by FluxBB