Truncate the characters displayed in a blog post

Tuesday, July 8, 2008 9:35 AM

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.... ;)




Feedback

# 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

# re: Truncate the characters displayed in a blog post

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

# re: Truncate the characters displayed in a blog post

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

# 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

# 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

# air yeezy

Your article is written very content, and meaningful to me. I think life just like shoes at our feet. Only wear comfortable, it can help to move forward for you. About you? 4/27/2010 7:59 PM | nike air yeezy

# re: Truncate the characters displayed in a blog post

Easy option to get useful information as well as share good stuff with good ideas and concepts
5/13/2010 2:47 AM | BC Bad Credit Mortgage Loan

# Close Extra Formating Tags & Add a Link to the Article

This is great, and much less invasive then changing the ListView to a DataFormWebPart. One small annoyace is if the Blog post contains formated real text where the cutoff point is. if that happens the remained of the page keeps the formating (e.g. bold, underlined, italics) because the associated tag was never closed. My solution to that is to close the possiblie open tags (I know its not the prettiest way to do this, but it works; and the alternative is to switch to the DataFormWebPart and write a bunch of if then statements). So directly following the line that you added from this article:

...</Limit>

you'll find this section of code:

<HTML><![CDATA[</div>]]></HTML>

replace that with:

<HTML><![CDATA[</u></b></i></em></strong></div>]]></HTML>

Again it's not perfect, since we shouldn't really be closing all those tags if they don't exsist (plus they could be more tags like coloring and font styles; feel free to add those if you use them), but its not hurting anything and the alternative is kind of a pain.

To add a link to read the full post you can just add this code directly following the line we just added:

<HTML><![CDATA[<a href="]]></HTML><HttpVDir CurrentWeb="TRUE"/><HTML><![CDATA[/Lists/Posts/Post.aspx?ID=]]></HTML><Column Name="ID" URLEncode="TRUE"/><HTML><![CDATA[" style="display:block;width:100%;text-align:right;clear:both;">[ Read the Full Post ]</a>]]></HTML>

If you combine the tips from the original post and these additions you can adjust have a page with nicely truncated blog posts with easy to follow links to the individual article pages. 6/1/2010 3:15 AM | ChuckLew

# re: Truncate the characters displayed in a blog post

I've been looking for this info for a long time, thanks for your work. 6/21/2010 2:46 AM | eve isk

# re: Truncate the characters displayed in a blog post

thanks a lot 7/18/2010 6:45 AM | betclic.fr

# re: Truncate the characters displayed in a blog post

Why we choose MBT? Because MBT is completely different with many other shoes. MBT is very particular, it has a positive on the entire body, not just the feet. MBT shoes actives muscle tissue instead of undermining all of them. It is unstable, not stable. The only is curved, not flat. 8/23/2010 12:57 PM | mbt shoe

# video games

that's cool.if I want to know more about this ,could you tell me more. 8/24/2010 3:16 PM | ffxiv gil

# re: Truncate the characters displayed in a blog post

Thanks for a very informative presentation! I read this article. I think you have a good think. I have been reviewing many blogs. Some are very informative some are entertaining. I have to say, good post on this blog, I’ll be sure to watch it again very soon. 8/25/2010 2:59 PM | Seattle dui lawyer

# re: Truncate the characters displayed in a blog post

I absolutely have enjoyable reading your blog. dont stop posting the excellent quality info!
8/26/2010 1:21 PM | mbt sheos

# re: Truncate the characters displayed in a blog post

very nice 8/31/2010 8:13 PM | ed

#  lucky

It's so lucky for me to find your blog! So shocking and great! Just one suggestion: It will be better and easier to follow if your blog can offer rrs subscription service. 9/10/2010 6:47 PM | Discount Nike Shox Shoes

# re: Truncate the characters displayed in a blog post

Nice article thanks for sharing this! 9/15/2010 6:30 PM | ED Hardy Handbags

# rtt



thank you for your advise
chanel purses for cheap 9/22/2010 6:50 PM | chanel purses for cheap

# re: Truncate the characters displayed in a blog post

Respectful opinion and debate is welcome, but comments that are defamatory, 9/25/2010 4:59 PM | david

# re: Truncate the characters displayed in a blog post

I enjoyed to be at here because one of my point has been cleared here.
Blogs are becoming the main source of knowing about things certainty,its
importance,idolizing,either in a marketing way that one can differentiate. 9/28/2010 6:39 AM | Potato Exporters

# re: Truncate the characters displayed in a blog post

"Wow," it is actually nice to read a post from someone that knows a subject well and is able to get their direct across.I am really looking forward to your next post. 9/28/2010 2:41 PM | onion exporters

# re: Truncate the characters displayed in a blog post

Nice post! I loved it your way of information..Good blog, great PIcs. I need more tips & info for this..Traveling is a wonderful experience I had a great experience with rajputana tours, Thanks
9/28/2010 3:38 PM | Guest House in Jodhpur

# re: Truncate the characters displayed in a blog post

Keep up the good work.Your article is really great and I truly enjoyed reading it.Waiting for some more great articles like this from you in the coming days. 9/28/2010 4:03 PM | Mango Exporters

# re: Truncate the characters displayed in a blog post

Nice post! I loved it your way of information.. I need more tips for this.. Can you provide more information for this? I am waiting your information… 9/29/2010 7:41 PM | Granite Exporters

# re: Truncate the characters displayed in a blog post

cheap new Laptop Battery for sale A study on ...was done / developed by []



This paper examines a new measure of xx in xx based on fuzzy mathematics which overcomes the difficulties found in other xx measures. Laptop Battery I d like to practise tennis and learn A study on ...was done / developed by [] During the past decade, the theory of fuzzy sets has developed in a variety of directions, family takes up all my time. DELL Laptop Batteries As for me, I'm firmly convinced that the number of foreign tourists should be limited, for the following reasons: Section 7 provides a summary and a discussion of some extensions of the paper. The compatibility of a project in terms of cost, and xx are likewise represented by linguistic variables. []'s model requires consideration of .. APPLE Laptop Batteries We could go for lunch another day, if 10/17/2010 12:50 PM | laptop battery

# re: Truncate the characters displayed in a blog post

I particularly like the way you lay out your points. I’ll keep watching for more.
10/20/2010 7:33 PM | web editor

# re: Truncate the characters displayed in a blog post



I recently came across your blog and have been reading along.
I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading.Nice blog,I will keep visiting this blog very often 11/1/2010 10:48 PM | GHD Hair Straighteners

# re: Truncate the characters displayed in a blog post

I found your weblog on google and skim just a few of your different posts. I simply added you to my Google Information Reader. Keep up the nice work. Look ahead to studying more from you in the future. 11/5/2010 7:42 PM | air jordan spizike cool grey

# re: Truncate the characters displayed in a blog post

What a waste of time. You're poor english made this article hard to read. Learn to write. 11/5/2010 7:45 PM | air jordan spizike kings county

# re: Truncate the characters displayed in a blog post

Thanks for sharing this brilliant article! That is really fascinating and I adore reading and I'm always searching for informative info like this. 11/5/2010 7:47 PM | authentic air jordan spizike

# re: Truncate the characters displayed in a blog post

Great precise info, I've been searching on this topic for a while. Bookmarked and recommended!
11/23/2010 2:55 PM | Office 2010 Activation

# microsoft office 2010 standard product key

It is wonderful right here. good research. I've been searched this kind of information for quite a while. thanks
11/24/2010 9:01 AM | office 2010 product key

# re: Truncate the characters displayed in a blog post

Considerably, this post is really the sweetest on this notable topic. I harmonise with your conclusions and will thirstily look forward to your incoming updates. Saying thanks will not just be sufficient, for the phenomenal clarity in your writing. I will directly grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!? Please excuse my poor English as it is not my first tongue.
office 2007
12/4/2010 8:40 AM | Office 2007

# re: Truncate the characters displayed in a blog post


This article helps me more.Discount Ugg Boots Thanks for yours sharing, I will pay more

attentions to your blog.Fashion Handbags I will be looking forward to your better and

better articles. See you next time. 12/9/2010 10:09 AM | wholesale handbags

# re: Truncate the characters displayed in a blog post

Thanks for sharing this info! 12/16/2010 7:47 AM | christianlouboutin

# re: Truncate the characters displayed in a blog post

Thanks for sharing i like it 12/21/2010 10:54 AM | uggs

# re: Truncate the characters displayed in a blog post

GOOD info!I'M LOOKING FORWARD TO READING ANOTHER ONE. 12/23/2010 1:07 PM | Vdeal

# re: Truncate the characters displayed in a blog post

Me and my friend were arguing about an issue similar to this! Now I know that I was right. lol! Thanks for the information you post. 1/15/2011 6:13 PM | commander viagra

# re: Truncate the characters displayed in a blog post

Interesting blog, the author thanks so much for the interesting explanation! 1/19/2011 7:15 PM | acheter viagra

# re: Truncate the characters displayed in a blog post

Hi, interesting post. I have been pondering this issue,so thanks for posting. I will visit your blog again 1/25/2011 3:27 PM | Jodhpur Hotel

# re: Truncate the characters displayed in a blog post

interesting post. I have been pondering this issue 1/28/2011 11:10 AM | buy isk

# re: Truncate the characters displayed in a blog post

cool.....
thx 1/28/2011 11:12 AM | EVE SHIP

# re: Truncate the characters displayed in a blog post

Thanks for posting this useful information. This was just what I was on looking for.
1/28/2011 2:06 PM | Truth About Abs

# re: Truncate the characters displayed in a blog post

I was just browsing for relevant blog posts for my project research and I happened to discover yours. Thanks for the excellent information.
1/28/2011 2:11 PM | Hydrolyze

# re: Truncate the characters displayed in a blog post

I've enjoyed the other ones so much, I can't wait for the new one. Congrats again on the new release. 2/17/2011 9:14 AM | car battery charger

# re: Truncate the characters displayed in a blog post

I found that this is good only for the aspx web blog. I do not have this kind of platform actually by i like it somehow. 3/3/2011 10:34 AM | Lead Generation

# re: Truncate the characters displayed in a blog post

Very good job thx for this post ;) 3/4/2011 4:15 AM | dosettes expresso tassimo

# re: Truncate the characters displayed in a blog post

Ditto with the mitto - great post 3/12/2011 1:00 AM | B2B Sales Outsourcing

# re: Truncate the characters displayed in a blog post

Man, talk about a fantastic post! I?ve stumbled across your blog a few times within the past, but I usually forgot to bookmark it. But not again! Thanks for posting the way you do, I genuinely appreciate seeing someone who actually has a viewpoint and isn?t really just bringing back up crap like nearly all other writers today. Keep it up! 3/13/2011 12:16 PM | Immobilien Mallorca

# re: Truncate the characters displayed in a blog post

A lot of interesting things found on your blogs, like the topic! The author thanks and success in the blog! 3/18/2011 9:33 AM | acheter cialis

# re: Truncate the characters displayed in a blog post

Excellent article, interesting blog. Thanks to the author 3/18/2011 1:03 PM | car loan

# re: Truncate the characters displayed in a blog post

I like thist blog ,Thank you for sharing!
3/21/2011 8:42 AM | comprar viagra

# re: Truncate the characters displayed in a blog post

Excellent article, interesting blog. Thanks to the author 3/29/2011 11:32 PM | laser hair removal cost

# re: Truncate the characters displayed in a blog post

I think your article well written, especially the middle section that I like,
I support you!
3/30/2011 12:30 PM | wow powerleveling

# re: Truncate the characters displayed in a blog post

Good!I like it! 4/2/2011 1:04 PM | eve isk

# re: Truncate the characters displayed in a blog post

Useful for real, thanks a lot . I tried and saved just in case but it's great 4/5/2011 7:44 PM | Tadalafil

# re: Truncate the characters displayed in a blog post

I like thist blog)) 4/6/2011 3:12 AM | kaufen viagra

# re: Truncate the characters displayed in a blog post

thank you for sharing,
i learn a lot information from this article and increse my knowledge,thank yuo ! 4/12/2011 8:30 PM | authentic jerseys

# re: Truncate the characters displayed in a blog post

Great post. Thank you so much sharing this. I would be happy to read more of your article. 4/12/2011 9:35 PM | scottsdale self storage

# re: Truncate the characters displayed in a blog post

A lot of interesting things found on your blogs, like the topic! 4/13/2011 7:09 AM | acheter du kamagra

# re: Truncate the characters displayed in a blog post

Hai un blog molto bene che la cosa principale molto interessante e utile!
4/18/2011 1:17 PM | Compra subito Cipro

# re: Truncate the characters displayed in a blog post

It's better when you can show only part of the best, rather than the whole one 4/19/2011 4:40 AM | reverse cell phone lookup

# re: Truncate the characters displayed in a blog post

very the article is help ful. The best publication, very good, thank 4/21/2011 9:40 PM | Mac UC, Contrucción

# re: Truncate the characters displayed in a blog post

good it like much. 4/26/2011 11:24 PM | Rimasa, Lockers

# re: Truncate the characters displayed in a blog post

Great post. Thank you so much sharing this. 4/27/2011 8:27 PM | Bendito, Descuento

# re: Truncate the characters displayed in a blog post

Me and my friend were arguing about an issue similar to this! Now I know that I was right 4/28/2011 12:06 AM | Rimasa, Refrigeradores

# re: Truncate the characters displayed in a blog post

You have a very good blog that the main thing a lot of interesting and useful! 5/1/2011 8:03 PM | Acheter kamagra sur Internet

# re: Truncate the characters displayed in a blog post

I like thist blog ,Thank you for sharing! 5/11/2011 12:37 PM | buy clomid

# acheter viagra sur le net

vous écrivez bien) attend avec impatience, un autre article) 5/14/2011 6:11 PM | Marta

# re: Truncate the characters displayed in a blog post

Good article...now I know hot to truncate the characters in a blog post thx 5/26/2011 12:48 AM | Leg Cramps at Night

# re: Truncate the characters displayed in a blog post

l'article est très utile d'aide. La meilleure publication, très bon, merci 5/27/2011 1:21 AM | acheter kamagra

# re: Truncate the characters displayed in a blog post

Great! Thanks! I can now rid myself of those overly long characters on my blog posts. 9/30/2011 1:45 PM | Lead Generation

# re: Truncate the characters displayed in a blog post

Simply such an amazing blog got to know the views on various topics from the professionals.
http://www.johareez.com 10/1/2011 10:07 AM | Online Shopping

# Popular front for Christian Louboutin

The first lady and Christian Louboutin, our goal is to be popular and fashionable vane, offer the best products and service, the most preferential price. 10/19/2011 7:15 AM | Christian Louboutin Ambassador

# re: Truncate the characters displayed in a blog post

I used to run into this issue, now I know how to solve it. 11/2/2011 12:42 PM | Cell phone tracker

# re: Truncate the characters displayed in a blog post

I agree, it's the best R4 card for Nintendo game console DS and DSi. 11/2/2011 12:44 PM | Carte DS

# re: Truncate the characters displayed in a blog post

I recently found your web site doing research on the internet. It reduced the problem considerably. Thanks. 11/4/2011 2:22 PM | Tera online

# re: Truncate the characters displayed in a blog post

Great post, very well done by your blog! Thanks to author! 11/8/2011 6:49 PM | comprar viagra

# re: Truncate the characters displayed in a blog post

This is very helpful. I never knew something like this before. Great for bloggers. 11/10/2011 12:25 PM | call center philippines

# re: Truncate the characters displayed in a blog post

Your blog post is really interesting and I liked it. I'll tell you about it to friends. Thank you so much!
<div style="position:relative;left:-3519px;"><table><tr><td>acheter viagra</td></tr></table></div>
12/1/2011 10:08 PM | Anderotin

# re: Truncate the characters displayed in a blog post

Thanks for sharing and letting us aware about this information. This is a great thread, so much info.it ls a good article and love your words , so charming and make people learn a lot , thanks !
12/8/2011 12:47 PM | buy wow gold

# re: Truncate the characters displayed in a blog post

History has demonstrated that the most notable winners usually encountered heartbreaking obstacles before they triumphed. They won because they refused to become discouraged by their defeats. 12/15/2011 4:08 AM | cell phone directory

# Web Solutions Company

This is an execellent blog, I like the way of the information, Thanks for the post. 12/21/2011 4:05 PM | Zyphr

# Software Solutions India

We are a India based company focused on making business processes simpler with our various Technical solutions. We work in the field of Web Designing, Web Renovation, Web Development, Web Application, Software Solution, Internet Marketing, Mobile Solutions.Applications and Websites, E-Commerce Solution and Online Brand Management. 1/26/2012 12:29 PM | Web Solutions India

# Web Designing Mumbai

ZyphrWeb is a web-development company in the business of creating value and trust. 1/26/2012 12:31 PM | Web Development Company Mumbai

# Latest Technology News

This Blog Read The Latest Technology News,Latest Technology Updates,Top Technology News,Today Technology News,New Technology,Science And Technology, The Internet Technology and Wireless Technology.Find Mobile product reviews on new tech gadgets. 1/26/2012 12:32 PM | Latest Technology updates

# re: Truncate the characters displayed in a blog post

A Review farmville bot

TractorBot is an automation program that will do your farmville farming automatically. These programs are known as bots. I have tried 3 of these bots and found that TractorBot was the most stable and has been ever since I tried it.
Other farmville bots take quite a bit of configuration, and will often lock up or just stop working in some way or another. One such bot will even accidentally lock you out of your farm. TractorBot does not do this.
TractorBot only runs on windows, so if you have a mac you are out of luck.
Although TractorBot may not do quite as many things as other bots, in the end you will spend less time fiddling with this bot than other bots. If you are a very technical type and know how to edit programming languages then there are more advanced bots you could try. But if you just want a quick way to get your farming done without sitting there and clicking hundreds of times then this is a good start 2/24/2012 10:33 PM | farmvillebot

# re: Truncate the characters displayed in a blog post

Although TractorBot may not do quite as many things as other bots, in the end you will spend less time fiddling with this bot than other bots. If you are a very technical type and know how to edit programming languages then there are more advanced bots you could try. But if you just want a quick way to get your farming 2/29/2012 2:44 PM | swtor credits

# re: Truncate the characters displayed in a blog post

Thanks, you save my day. 10/5/2012 11:33 PM | Irawan Ahromi

Post a comment