Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-03 12:04:21

gaup
Member
Registered: 2006-12-03
Posts: 37

Show title and excerpt

I want the title (with hover) and excerpt showing up. But, when I open my article page only excerpt and the text “les hele artikkelen” (read more) are showing up.
And when I open the read more, then the title is showing twice .
The code inside content:

<h4><txp:permlink><txp:title/></txp:permlink></h4>(this is maybe the reason why showing twice)
<txp:article form=“article” listform=“excerpt” />.
<p><txp:permlink><txp:comments/></txp:permlink> </p>

I would be happy if someone could help me with this. Thanks!

Offline

#2 2006-12-03 14:20:33

gaup
Member
Registered: 2006-12-03
Posts: 37

Re: Show title and excerpt

and here is the site: http://www.siank.no

Offline

#3 2006-12-03 16:20:39

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Show title and excerpt

You should post the content of the two forms “article” and “excerpt”.

Offline

#4 2006-12-03 17:57:33

gaup
Member
Registered: 2006-12-03
Posts: 37

Re: Show title and excerpt

article:
<h3>
<p><txp:permlink><br></txp:permlink>&#183;<txp:posted/></h3>

<txp:excerpt/></p>
<txp:body/>
<p>
<txp:comments_invite/>
</p>

excerpt:
<txp:excerpt />

<txp:permlink>les hele artikkelen</txp:permlink>

Offline

#5 2006-12-04 12:56:53

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Show title and excerpt

gaup, its not very clear whether you want the excerpt to show up on the individual article page.

I have something like this in a “news” page:

<txp:if_individual_article>
<!— article page: display the live article —>
<txp:article form=“news_single” limit=1 />
</txp:if_individual_article>

<txp:if_article_list>
<txp:article form=“news_list” />
</txp:if_article_list>

The two forms:

news_list form (list all the news stories, display the excerpt IF there is one, otherwise just the body of the article)

<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:if_excerpt>
<txp:excerpt />
<txp:else />
<txp:body />
</txp:if_excerpt>
<p class=“small”><txp:permlink>Read full story</txp:permlink> Posted: <txp:posted /></p>

news_single form (show the individual article if on an individual article page)

<h2><txp:title /></h2>
<p class=“small”>Posted: <txp:posted /></p>
<txp:comments_invite wraptag=“p” />
<txp:body />
<txp:article_image />

You can play around with the above code, and see if it helps you.

Last edited by jstubbs (2006-12-04 12:58:52)

Offline

#6 2006-12-04 13:51:25

gaup
Member
Registered: 2006-12-03
Posts: 37

Re: Show title and excerpt

THANKS. Finally, it worked. Now I started to understand how this work

Offline

Board footer

Powered by FluxBB