Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-11-09 19:37:08
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Read More in excerpt
How can I add a ‘read more’ link in the excerpt using the permlink.
Currently, I have the excerpt filled out. Ina form, I and using a permlink and excerpt tags.
However, textpattern places the excerpt inside a <p>, so my link breaks to a new line.
How can I change this?
Thanks
Rich
Offline
Re: Read More in excerpt
If I understand you correctly I think you may need “floats” in the CSS so have a read of this post which was a similar question.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2009-11-09 22:23:30
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: Read More in excerpt
I was thinking floats, but i think it may wrap around p, and not just end up at the end of the text.
I probably should have posted my code.
//Code
<div class=“section”>
<h2><txp:title /></h2>
<txp:excerpt /><txp:permlink>Read More</txp:permlink>
</div>
The above will produce something like:
<div class=“section”>
<h2>Article Title</h2>
<p>My excerpt describing the article</p><a href=”/link-to-article>Read More</a>
</div>
and what I’d like to have is:
<div class=“section”>
<h2>Article Title</h2>
<p>My excerpt describing the article<a href=”/link-to-article>Read More</a></p>
</div>
Notice the link is wrapped inside the paragraph.
Any thoughts on this?
Thanks
Rich
Offline
Re: Read More in excerpt
I know this means a bit of extra work with the excerpt but have you tried adding the read more link to the excerpt itself instead of the form?
OR
on the Write tab, in the Advanced Options in the left sidebar, you can set the “Excerpt Markup” to “Leave text untouched” which will remove the “p” tags, then add them to your form instead.
<div class=“section”>
<h2><txp:title /></h2>
<p><txp:excerpt /><txp:permlink>Read More</txp:permlink></p>
</div>
Last edited by thebombsite (2009-11-09 22:32:13)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#5 2009-11-10 15:07:55
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: Read More in excerpt
The reason I am placing this in the form, is because the client will end up adding content, I was setting it up so they did not need to add a read more link themselves.
Is there a way to default to leaving the excerpt untouched for all articles?
Thanks for you help!
Rich
Offline
#6 2009-11-10 17:54:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Read More in excerpt
richtestani wrote:
Is there a way to default to leaving the excerpt untouched for all articles?
Offline
#7 2009-11-10 18:30:04
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: Read More in excerpt
ah – cool!
Thanks
Offline
Pages: 1