Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-03 21:39:53

scdoody
Member
Registered: 2006-10-18
Posts: 129

rss_auto_excerpt

I want to use the rss_auto_excerpt plugin to do an excerpt based on number of words. So far its working. But right now the “Keep Reading” is displaying on the next link – as a new paragraph. I want to have “. . .” after the last word of the excerpt and then have “Read More”. And, I want the entire block (excerpt . . . Read More) to link to the article detail.

What would I add to the tag to make this happen. I’m confused because there are so many options for this tag.

<txp:rss_auto_excerpt words=“60” linktext=“Read More” />

Offline

#2 2008-07-03 22:02:45

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: rss_auto_excerpt

From looking at the documentation it looks like you want
<txp:rss_auto_excerpt words=“60” linktext="..." />
If you want the link to the full article to be wrapped in paragraph tags
<txp:rss_auto_excerpt words=“60” linktext="..." linkwraptag="span" /> and it will be in a span instead.

EDIT
OR you might want to use
<txp:rss_auto_excerpt words=“60” ending="..." linktext="Read More"/> to just add the elipse at the end of the excerpt?

Last edited by MattD (2008-07-03 22:04:40)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2008-07-03 22:03:03

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: rss_auto_excerpt

First off scdoody if you want to ask a question about a specific plug-in it is better to post directly to that plug-in’s thread so that the author knows someone is asking questions, so this thread may get moved.

In the meantime I’m not 100% sure of this as I don’t use the plug-in any more but there is an attribute “showlinkwithexcerpt” which should be set to “0”. This will remove the automatic link generation. You will then need to add the “Read More” text to your form. Then you need to wrap the excerpt and “Read More” text in <txp:permlink></txp:permlink> tags. Now the only problem with this is that I think this will result in the “full article” being linked as well so you probably need some conditionals:-

<txp:if_article_list>
<txp:permlink><txp:rss_auto_excerpt showlinkwithexcerpt="0" /> <span>Read More</span></txp:permlink>
<txp:else />
<txp:rss_auto_excerpt showlinkwithexcerpt="0" />
</txp:if_article_list>

Note how the permlink tag and “Read More” text is removed after <txp:else /> which hopefully means that the full article will display without being linked.

See if that works for you. I only show the one attribute for the plug-in so you will need to add any others you need.

Last edited by thebombsite (2008-07-03 22:08:21)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2008-07-03 22:07:01

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: rss_auto_excerpt

I must have missed “I want the entire block (excerpt . . . Read More) to link to the article detail” first time i read it. Stuart’s probably right since I totally misunderstood what you wanted.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2008-07-03 22:10:13

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: rss_auto_excerpt

I was having to think about it a bit Matt else I might have got there before you. :)

In fact thinking about it a bit more that second call to rss_auto_excerpt might not be necessary as I think it can simply be replaced by <txp:body /> which may also reduce the load on the database. A bit of trial and error is needed methinks.

Last edited by thebombsite (2008-07-03 22:17:28)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB