posts - 27, comments - 20, trackbacks - 0

My Links

News

These postings are provided "AS IS" with no warranties, and confers no rights.
Locations of visitors to this page

Tag Cloud

Archives

Post Categories

Truncate the characters displayed in a blog post

This is how to reduce the number of characters displayed in a blog post on the default.aspx page of a blog site created from the OOTB SharePoint blog template.

  • Open up the site in SharePoint Designer
  • Open the default.aspx and switch to Code View
  • Perform a Find & Replace for the following:
    • Find-
      • <Field Name="Body"/>
    • Replace-
      • <Limit Len="99" IgnoreTags="TRUE" MoreText="..."><Column Name="Body"/></Limit>
 
image 
 

This would limit the number of characters to 99 and display the text contained in the MoreText attribute as the last characters. Check out this for more info on the Limit element.

Do remember to back up the page before attempting this just in case.... ;)

Print | posted on Tuesday, July 08, 2008 9:35 AM | Filed Under [ MOSS WSS Blog SharePoint Designer ]

Feedback

Gravatar

# re: Truncate the characters displayed in a blog post

This is great !!! Thanks a million I have been looking for this functionality for the past 2 weeks.
But I am still stuck on how do I make the " more..." link to individual posts.

I would appreciate it if you have this too.
Thanks.
Emil.
9/3/2008 7:13 PM | Emil
Gravatar

# re: Truncate the characters displayed in a blog post

Excellent work.
8/29/2009 4:15 AM | Nalini
Gravatar

# re: Truncate the characters displayed in a blog post

Thank you! Great article!
10/2/2009 10:15 PM | Emanuel
Gravatar

# re: Truncate the characters displayed in a blog post

Really nice piece of work...must appreciate..i have seen many sites and blogs but never this tyoe of work before thanks for sharing... contacts http://informationex.com
10/4/2009 11:40 PM | free classified websites
Gravatar

# re: Truncate the characters displayed in a blog post

Great article!! I want to do the same with the body field of an announcement list. I had tried this but I do not get it working. Will the code be diferent for the announcement list? Thanks in advance.
10/7/2009 9:44 PM | mary
Gravatar

# brilliant!

this is good stuff... i was struggling with coverting the web part xslt data and modifying output format from there, but changing the CAML (which, until this point I didn't know was possible) is ... harder, yet easier at the same time... strange how that works.
10/13/2009 11:48 AM | tyler
Gravatar

# re: Truncate the characters displayed in a blog post

This would limit the number of characters to 99 and display the text contained in the MoreText attribute as the last characters. Check out this for more info on the Limit element.
10/20/2009 3:04 AM | nike shoes new
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: