You must have noticed a common trend these days in various Blogs of showing a picture thumbnail to give an idea about the article. Remember, a picture is worth thousand words.
Well, the trend is catching up fast as it has certainly helped increase the page views of the blogs who have implemented it.
We also run a blog using blogengine.net and wanted to implement the same. So, we just twisted some code and got it running in less than 5 minutes.
If you are also running BlogEngine.net
, then use this simple code to have it on your Blog too.
Just copy and paste the following file in the BlogEngine.net's App_Code\Controls
RelatedPosts.cs (7.12 kb)
If you don't want to download this file and make code changes yourself, then i have given the code at the bottom of this article.
Don't worry, this file does not make any major changes. I have just added two functions to fetch the thumbnail image out of the post code.
Your work is done as soon as you copy and replace the file. The thumbnails will immediately start showing up.
Some points to ponder: