Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-07 08:12:55

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

create an exceprt from the first paragraph of the body text?

I’ve seen there are some plugins that will truncate the main text at a certain number of chars and output it as an excerpt with a ‘more’ link.
What I’d like to do is slightly different.
I’d like to just output the first paragraph of the main text field. Thats it!
Is it possible?

Offline

#2 2006-07-07 15:31:54

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: create an exceprt from the first paragraph of the body text?

Sounds like you should just make use of the excerpt field, but yes that’s possible. I don’t think there’s an existing plugin that does this, though.

Offline

#3 2006-07-07 15:36:02

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: create an exceprt from the first paragraph of the body text?

I’m trying to eke out an excerpt from the category-info field in the jmc_events system.
but I can live without it…
thanks anyway

Offline

#4 2006-07-09 02:09:51

Insignia
Member
Registered: 2006-05-05
Posts: 13

Re: create an exceprt from the first paragraph of the body text?

Isn’t that exactly what the Beginning plugin would do if you set the excerpt length to a wee number? I haven’t actually made use of it (yet), but according to the documentation it cuts off at the end of the paragraph after it’s reached the specified number of characters – so a length of 1 character would logically cut it after the first paragraph.

Like I said, though, I haven’t tried it in practice yet.

Offline

#5 2006-07-10 07:39:40

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: create an exceprt from the first paragraph of the body text?

I think you’re right, thanks for spotting that.
But I can’t figure out how to use it with jmc_events – I suspect it’s just built to work with a standard article.

Offline

Board footer

Powered by FluxBB