Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-09-25 16:50:47
- kitikat
- Member
- Registered: 2008-09-21
- Posts: 12
about excerpts....
hi all,
i have little problem about excerpts, you see, i’m gonna showing 3 blog’s titles with some excerpts and of course “Read more” links.
the problem is just why the “read more” permlink is in outside the paragraph of excerpts?
at any rate i don’t used any excerpts plugins etc, i build the excerpts tags from here
also here’s my code on presentation;
Form ‘default’ :
—————————
<div class=“post”>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<div class=“info”>
<span class=“date”><txp:posted /></span>
<span class=“offset”>|</span>
<span class=“categories”><txp:category1 link=“1” section=“archives” this_section=“1” /></span>
<span>|</span>
<span class=“comments”><txp:if_comments><txp:permlink><txp:comments_count /> Comments</txp:permlink><txp:else /><txp:permlink>No Current Comments</txp:permlink></txp:if_comments></span>
</div><!—//.info—>
<txp:if_article_list>
<txp:excerpt /> <txp:permlink class=“more”>More</txp:permlink>
<txp:else />
<txp:body />
</txp:if_article_list>
</div><!—//.post—>
———————————
Page ‘default’;
———————————
<div id=“content”>
<txp:article_custom excerpted=“1” form=“default” limit=“3” pgonly=“0” section=“archives” sort=“Posted desc” status=“4” time=“past” />
</div><!—//#content—>
———————————
and last, the advance option on excerpts markup; ‘Leave text untouched’
use <p></p> tags on excerpts section article content
hope you all can help ;)
sorry for bad english
thanks before
Offline
#2 2008-09-25 22:05:12
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: about excerpts....
kitikat wrote:
and last, the advance option on excerpts markup; ‘Leave text untouched’
use <p></p> tags on excerpts section article content
Don’t know if I understand you correctly, but if you’ve set it to ‘leave text untouched’ or ‘convert linebreaks’, and you don’t use <p>
tags inside the excerpt, you can do this in the article form:
<p><txp:excerpt /> <txp:permlink class="more">More</txp:permlink></p>
Of course you can only have one paragraph this way.
Offline
#3 2008-09-28 08:19:34
- kitikat
- Member
- Registered: 2008-09-21
- Posts: 12
Re: about excerpts....
Els wrote:
Don’t know if I understand you correctly, but if you’ve set it to ‘leave text untouched’ or ‘convert linebreaks’, and you don’t use<p>
tags inside the excerpt, you can do this in the article form:
<p><txp:excerpt /> <txp:permlink class="more">More</txp:permlink></p>
Of course you can only have one paragraph this way.
hmmm…. and what should I do if my excerpts have 2 paragraph or more??
Offline
Re: about excerpts....
My advice would be to allow textile for the excerpts which will add the necessary “p” tags for one or more paragraphs but you need to wrap the “More” link in “p” tags in your form as this is not automatic so something like:-
<txp:if_article_list>
<txp:excerpt />
<p><txp:permlink class=“more”>More</txp:permlink></p>
<txp:else />
<txp:body />
</txp:if_article_list>
The “More” link is not a part of the excerpt, it only appears because it is included as part of the form template.
If you want it to be wrapped within a “p” tag which belongs to the excerpt itself you will need to remove it from the form template and add it to the end of the excerpt text.
Last edited by thebombsite (2008-09-28 09:24:01)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#5 2008-09-28 11:59:10
- kitikat
- Member
- Registered: 2008-09-21
- Posts: 12
Re: about excerpts....
@thebombsite : thanks for the advice, that’s worked to me :D
Offline
Pages: 1