1/15/2013 9:34:11 AM
15993
Reputation
2214
Total posts
Hi Super,
just a tip on the following:
2. In your custom project you need to inherit the BlogPostView control and override its ParseBlogPostTemplateTags method. This is where you should insert your custom logic, you should fetch the UserProfileEntity and add the AboutMe section in the Hashtable, for example:
var tags = base.ParseBlogPostTemplateTags(post, maxTitleChars, maxDescriptionChars, dateFormatString);
tags.Add("<# AboutMe #>", profile.AboutMySelf);
Request: I don't have any logic requirement - All I need is that when user clicks any blog post and in the blog post content page, at the bottom of the blog post, it should display "About me" info about the author of the blog post.
I don't know where to add this code ? It can't go in ascx file...this looks like .cs code...
var tags = base.ParseBlogPostTemplateTags(post, maxTitleChars, maxDescriptionChars, dateFormatString);
tags.Add("<# AboutMe #>", profile.AboutMySelf);
You can just put the following in your template file: "$Container.DataItem.AspnetUser.UserProfile.AboutMySelf" and use the built in support for NVelocity templating.
In this scenario I think that all this control / markup inheritance in not neccessary, Mario can you please confirm ?
Regards
Rating history (Content is rated 0.00 of 0 vote(s).)
Shows who have rated the content, and the rating score.