Geeks With Blogs

News These postings are provided "AS IS" with no warranties, and confers no rights.
Locations of visitors to this page virtusa corp sharepoint virtusa.com shehan peruma
Shehan Peruma

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

Posted on Tuesday, July 8, 2008 9:35 AM MOSS , WSS , Blog , SharePoint Designer | Back to top


Comments on this post: Truncate the characters displayed in a blog post

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by Emil on Sep 03, 2008 7:13 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Excellent work.
Left by Nalini on Aug 29, 2009 4:15 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Thank you! Great article!
Left by Emanuel on Oct 02, 2009 10:15 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by mary on Oct 07, 2009 9:44 PM

# brilliant!
Requesting Gravatar...
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.
Left by tyler on Oct 13, 2009 11:48 AM

# air yeezy
Requesting Gravatar...
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?
Left by nike air yeezy on Apr 27, 2010 7:59 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Easy option to get useful information as well as share good stuff with good ideas and concepts
Left by BC Bad Credit Mortgage Loan on May 13, 2010 2:47 AM

# Close Extra Formating Tags & Add a Link to the Article
Requesting Gravatar...
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.
Left by ChuckLew on Jun 01, 2010 3:15 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I've been looking for this info for a long time, thanks for your work.
Left by eve isk on Jun 21, 2010 2:46 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
thanks a lot
Left by betclic.fr on Jul 18, 2010 6:45 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by mbt shoe on Aug 23, 2010 12:57 PM

# video games
Requesting Gravatar...
that's cool.if I want to know more about this ,could you tell me more.
Left by ffxiv gil on Aug 24, 2010 3:16 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by Seattle dui lawyer on Aug 25, 2010 2:59 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I absolutely have enjoyable reading your blog. dont stop posting the excellent quality info!
Left by mbt sheos on Aug 26, 2010 1:21 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
very nice
Left by ed on Aug 31, 2010 8:13 PM

# lucky
Requesting Gravatar...
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.
Left by Discount Nike Shox Shoes on Sep 10, 2010 6:47 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Nice article thanks for sharing this!
Left by ED Hardy Handbags on Sep 15, 2010 6:30 PM

# rtt
Requesting Gravatar...


thank you for your advise
chanel purses for cheap
Left by chanel purses for cheap on Sep 22, 2010 6:50 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Respectful opinion and debate is welcome, but comments that are defamatory,
Left by david on Sep 25, 2010 4:59 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by Potato Exporters on Sep 28, 2010 6:39 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
"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.
Left by onion exporters on Sep 28, 2010 2:41 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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
Left by Guest House in Jodhpur on Sep 28, 2010 3:38 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by Mango Exporters on Sep 28, 2010 4:03 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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…
Left by Granite Exporters on Sep 29, 2010 7:41 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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
Left by laptop battery on Oct 17, 2010 12:50 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I particularly like the way you lay out your points. I’ll keep watching for more.
Left by web editor on Oct 20, 2010 7:33 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...


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
Left by GHD Hair Straighteners on Nov 01, 2010 10:48 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by air jordan spizike cool grey on Nov 05, 2010 7:42 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
What a waste of time. You're poor english made this article hard to read. Learn to write.
Left by air jordan spizike kings county on Nov 05, 2010 7:45 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Thanks for sharing this brilliant article! That is really fascinating and I adore reading and I'm always searching for informative info like this.
Left by authentic air jordan spizike on Nov 05, 2010 7:47 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Great precise info, I've been searching on this topic for a while. Bookmarked and recommended!
Left by Office 2010 Activation on Nov 23, 2010 2:55 PM

# microsoft office 2010 standard product key
Requesting Gravatar...
It is wonderful right here. good research. I've been searched this kind of information for quite a while. thanks
Left by office 2010 product key on Nov 24, 2010 9:01 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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
Left by Office 2007 on Dec 04, 2010 8:40 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...

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.
Left by wholesale handbags on Dec 09, 2010 10:09 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Thanks for sharing this info!
Left by christianlouboutin on Dec 16, 2010 7:47 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Thanks for sharing i like it
Left by uggs on Dec 21, 2010 10:54 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
GOOD info!I'M LOOKING FORWARD TO READING ANOTHER ONE.
Left by Vdeal on Dec 23, 2010 1:07 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by commander viagra on Jan 15, 2011 6:13 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Interesting blog, the author thanks so much for the interesting explanation!
Left by acheter viagra on Jan 19, 2011 7:15 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Hi, interesting post. I have been pondering this issue,so thanks for posting. I will visit your blog again
Left by Jodhpur Hotel on Jan 25, 2011 3:27 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
interesting post. I have been pondering this issue
Left by buy isk on Jan 28, 2011 11:10 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
cool.....
thx
Left by EVE SHIP on Jan 28, 2011 11:12 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Thanks for posting this useful information. This was just what I was on looking for.
Left by Truth About Abs on Jan 28, 2011 2:06 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I was just browsing for relevant blog posts for my project research and I happened to discover yours. Thanks for the excellent information.
Left by Hydrolyze on Jan 28, 2011 2:11 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I've enjoyed the other ones so much, I can't wait for the new one. Congrats again on the new release.
Left by car battery charger on Feb 17, 2011 9:14 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by Lead Generation on Mar 03, 2011 10:34 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Very good job thx for this post ;)
Left by dosettes expresso tassimo on Mar 04, 2011 4:15 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Ditto with the mitto - great post
Left by B2B Sales Outsourcing on Mar 12, 2011 1:00 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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!
Left by Immobilien Mallorca on Mar 13, 2011 12:16 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
A lot of interesting things found on your blogs, like the topic! The author thanks and success in the blog!
Left by acheter cialis on Mar 18, 2011 9:33 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Excellent article, interesting blog. Thanks to the author
Left by car loan on Mar 18, 2011 1:03 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I like thist blog ,Thank you for sharing!
Left by comprar viagra on Mar 21, 2011 8:42 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Excellent article, interesting blog. Thanks to the author
Left by laser hair removal cost on Mar 29, 2011 11:32 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I think your article well written, especially the middle section that I like,
I support you!
Left by wow powerleveling on Mar 30, 2011 12:30 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Good!I like it!
Left by eve isk on Apr 02, 2011 1:04 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Useful for real, thanks a lot . I tried and saved just in case but it's great
Left by Tadalafil on Apr 05, 2011 7:44 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I like thist blog))
Left by kaufen viagra on Apr 06, 2011 3:12 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
thank you for sharing,
i learn a lot information from this article and increse my knowledge,thank yuo !
Left by authentic jerseys on Apr 12, 2011 8:30 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Great post. Thank you so much sharing this. I would be happy to read more of your article.
Left by scottsdale self storage on Apr 12, 2011 9:35 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
A lot of interesting things found on your blogs, like the topic!
Left by acheter du kamagra on Apr 13, 2011 7:09 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Hai un blog molto bene che la cosa principale molto interessante e utile!
Left by Compra subito Cipro on Apr 18, 2011 1:17 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
It's better when you can show only part of the best, rather than the whole one
Left by reverse cell phone lookup on Apr 19, 2011 4:40 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
very the article is help ful. The best publication, very good, thank
Left by Mac UC, Contrucción on Apr 21, 2011 9:40 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
good it like much.
Left by Rimasa, Lockers on Apr 26, 2011 11:24 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Great post. Thank you so much sharing this.
Left by Bendito, Descuento on Apr 27, 2011 8:27 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Me and my friend were arguing about an issue similar to this! Now I know that I was right
Left by Rimasa, Refrigeradores on Apr 28, 2011 12:06 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
You have a very good blog that the main thing a lot of interesting and useful!
Left by Acheter kamagra sur Internet on May 01, 2011 8:03 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I like thist blog ,Thank you for sharing!
Left by buy clomid on May 11, 2011 12:37 PM

# acheter viagra sur le net
Requesting Gravatar...
vous écrivez bien) attend avec impatience, un autre article)
Left by Marta on May 14, 2011 6:11 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Good article...now I know hot to truncate the characters in a blog post thx
Left by Leg Cramps at Night on May 26, 2011 12:48 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
l'article est très utile d'aide. La meilleure publication, très bon, merci
Left by acheter kamagra on May 27, 2011 1:21 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Great! Thanks! I can now rid myself of those overly long characters on my blog posts.
Left by Lead Generation on Sep 30, 2011 1:45 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Simply such an amazing blog got to know the views on various topics from the professionals.
http://www.johareez.com
Left by Online Shopping on Oct 01, 2011 10:07 AM

# Popular front for Christian Louboutin
Requesting Gravatar...
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.
Left by Christian Louboutin Ambassador on Oct 19, 2011 7:15 AM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I used to run into this issue, now I know how to solve it.
Left by Cell phone tracker on Nov 02, 2011 12:42 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I agree, it's the best R4 card for Nintendo game console DS and DSi.
Left by Carte DS on Nov 02, 2011 12:44 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
I recently found your web site doing research on the internet. It reduced the problem considerably. Thanks.
Left by Tera online on Nov 04, 2011 2:22 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Great post, very well done by your blog! Thanks to author!
Left by comprar viagra on Nov 08, 2011 6:49 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
This is very helpful. I never knew something like this before. Great for bloggers.
Left by call center philippines on Nov 10, 2011 12:25 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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>
Left by Anderotin on Dec 01, 2011 10:08 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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 !
Left by buy wow gold on Dec 08, 2011 12:47 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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.
Left by cell phone directory on Dec 15, 2011 4:08 AM

# Web Solutions Company
Requesting Gravatar...
This is an execellent blog, I like the way of the information, Thanks for the post.
Left by Zyphr on Dec 21, 2011 4:05 PM

# Software Solutions India
Requesting Gravatar...
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.
Left by Web Solutions India on Jan 26, 2012 12:29 PM

# Web Designing Mumbai
Requesting Gravatar...
ZyphrWeb is a web-development company in the business of creating value and trust.
Left by Web Development Company Mumbai on Jan 26, 2012 12:31 PM

# Latest Technology News
Requesting Gravatar...
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.
Left by Latest Technology updates on Jan 26, 2012 12:32 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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
Left by farmvillebot on Feb 24, 2012 10:33 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
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
Left by swtor credits on Feb 29, 2012 2:44 PM

# re: Truncate the characters displayed in a blog post
Requesting Gravatar...
Thanks, you save my day.
Left by Irawan Ahromi on Oct 05, 2012 11:33 PM

Your comment:
 (will show your gravatar)


Copyright © shehan | Powered by: GeeksWithBlogs.net | Join free