Dave Burke : Freelance .NET Web Developer specializing in Online Communities

CS Nuglet: Taming the 2008.5 Blog Post Excerpt

If you go with excerpts on a Community Server 2008.5 blog, they may look funky and you may wonder why.  Wonder no more, because CS2008.5 excerpts are now in HTML format. I would think this has to be an oversight in CS2008.5, but haven't seen anything official about it either way. Up to and including CS2008, excerpts were stored in plain text. Don't believe me? Here are excerpt edit controls for CS2007, CS2008 and CS2008.5.

 

 

 


Excerpts continue to be stored as a PropertyValue in cs_posts, and in CS2008.5 include the HTML you see on the second pic below.
 

 


The WeblogPostData Chameleon Control has a smart GetExcerpt() method for the "excerpt" property to display the post excerpt if it's present.  The problem is that the method hasn't been updated to handle an HTML-based excerpt, thus the display weirdness.

If you don't have your own custom WeblogPostData control, you're SOL.  (Who doesn't leave the house without their own WeblogPostData control?)  Otherwise, updating GetExcerpt() to remove the HTML formatting and turn off auto-elipsing begins the process of taming the CS2008.5 Excerpt.



Referring to our custom control in the PostList and TagList pages takes us home.



Comments (2) | Post RSS RSS comment feed

Posted on 10/2/2008 3:47:36 PM by Dave Burke
Categories: Community Server
Tags: No tags for this post

Related posts

Comments

10/4/2008 8:17:17 AM Permalink

Hey Dave,

Good find. I will try to squeeze this on the list for 2008.5 SP1.

Thanks,
Scott

Scott Watermasysk United States |

10/4/2008 8:35:35 AM Permalink

Thanks, Scott. Yeah, this didn't feel quite right.  Looking forward to SP1!

Dave Burke United States |

Comments are closed

This site was built with the Sueetie .NET Open Source Community Framework. Learn more about Sueetie at Sueetie.com.