Truncating the body text
Posted: 29 March 2006 06:14 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  335
Joined  01-25-2006

I’m building prior to moving my site over from MT (hurrah!) and in MT I had the ability to truncate each story - set to a number of words. I used this to create a home page list of summarised entries and if no summary actually existed it would use the body field instead. I can’t yet find a way of doing this with EE:

For example I would like to be able to truncate the {body} content to 50 words to get this effect:

Story Headline
Lorum ipsume blah blah urna, fermentum a, eleifend vel, elementum ut, nunc. Nulla nibh elit, iaculis sed, aliquet nec, sollicitudin sit amet, ante. Donec in metus eget lacus malesuada porta. Phasellus placerat facilisis mauris. Duis elit ipsum, mattis et, sagittis vel, interdum sit amet, nibh. Fusce egestas. Praesent aliquet lorem…  Read More…

The alternative is to fill in the summary field in the entry - but I have hundreds of posts and no time…

Any ideas please?

TIA
Simon

 Signature 

“All men are equal. All men, that is, who possess umbrellas.” E.M. Forster 

Artscape and Santaballs
Chris O’Donoghue Chelsea Garden Designer
The Greenwich and District Narrow Gauge Railway Society
Croydon RFC

Profile
 
 
Posted: 29 March 2006 06:49 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12433
Joined  04-29-2002

There is a word limiter plugin that will do this for you.

Word Limiter


-or-

Word Limit Plus

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 29 March 2006 07:15 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  335
Joined  01-25-2006

Brilliant!

Thanks Sue!

 Signature 

“All men are equal. All men, that is, who possess umbrellas.” E.M. Forster 

Artscape and Santaballs
Chris O’Donoghue Chelsea Garden Designer
The Greenwich and District Narrow Gauge Railway Society
Croydon RFC

Profile
 
 
Posted: 29 March 2006 09:26 AM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6091
Joined  08-04-2002

There is also the Filter HTML plugin that does what you want and quite a bit more.

Profile
 
 
Posted: 22 April 2006 06:49 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  335
Joined  01-25-2006

I’m having a look at Filter HTML but the link for further information is a 404 and I cannot find the info on his site as its been redesigned - does anyone have the full details of this plug-in to hand? Or is it all in the filter module explanation? Erm… yes it is - its all there… No need for anyone to tell me now. smile

 Signature 

“All men are equal. All men, that is, who possess umbrellas.” E.M. Forster 

Artscape and Santaballs
Chris O’Donoghue Chelsea Garden Designer
The Greenwich and District Narrow Gauge Railway Society
Croydon RFC

Profile
 
 
Posted: 22 April 2006 08:52 PM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6091
Joined  08-04-2002

You can install the plugin (Filter HTML) and there is quite a bit more information about what it can do in the CP Plugin Manager.

Profile
 
 
Posted: 22 April 2006 08:57 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  335
Joined  01-25-2006

Yep, I spotted it after I had posted! I did not realise that the plug-in title was a link to the plug-ins information. Thankyou.

 Signature 

“All men are equal. All men, that is, who possess umbrellas.” E.M. Forster 

Artscape and Santaballs
Chris O’Donoghue Chelsea Garden Designer
The Greenwich and District Narrow Gauge Railway Society
Croydon RFC

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65075 Total Logged-in Users: 29
Total Topics: 82210 Total Anonymous Users: 12
Total Replies: 441842 Total Guests: 188
Total Posts: 524052    
Members ( View Memberlist )
Newest Members:  TomsBmackskithbtggAdminempoleongwishPasha MahardikarmarkdurandomcatClutch Bearings