Mono Support  Why there is no "Read More" link when I put anything in Blog Excerpt ?  

Viewed 26062 time(s), 8 post(s), 1/10/2013 1:29:29 AM - by super
1/10/2013 1:29:29 AM
6018 Reputation 709 Total posts

Why there is no "Read More" link or button when I put anything in Blog Excerpt ?

How any user will come to know that there is more information in any blog post ? I know blog post title is a link but how come a user will know there there is more information and there is no "Read more" link or button ?

Please help in adding this link or button that says "Read More" if there is anything in Blog Excerpt ?

1
1/10/2013 2:56:06 PM
6018 Reputation 709 Total posts

anyone ?

2
1/10/2013 9:29:02 PM
7207 Reputation 956 Total posts

You can add you own link. Please check the template for the BlogList web part in /App_Templates/Default/BlogTemplates/BlogList.ascx. You will see how the title link is formatted, so please do the same with your own Read more link.

3
1/11/2013 6:54:40 PM
6018 Reputation 709 Total posts

Denis, could you please tell me the exact code that will go there ? and where to add ?

I don't know what is the system name for read more link...

Also , why I don't see any system name for "Excerpt" in the BlogList.ascx in template folder ? Then how come the webpart takes the content from Excerpt ?

4
1/14/2013 11:04:27 AM
2218 Reputation 300 Total posts

Hello,

Denis, could you please tell me the exact code that will go there ? and where to add ?
As Denis described you need to adapt the following for your own needs (this is located in the /App_Templates/Default/BlogTemplates/BlogList.ascx):
<a href="<# Link #>" class="taggedlink">
    <span class="date"><# PubDate #></span>
    <# Title #>
</a>
So your new Read More link would be similar to this:
<a href="<# Link #>"><# ReadMore #></a>
You could place this below the description tag which is the Excerpt content or somewhere else depending on your needs. Since <# ReadMore #> is a new tag you would need to preform similar steps described in this post to show custom text. The main differences would be that instead of the BlogPost.ascx template you would be using BlogList.ascx template and instead of overriding ParseBlogPostTemplateTags method in the BlogPostView control you would be overriding the method in the BlogPostList control.

Alternatively instead of using the tag (if all you need is text) you could place your own resource key directly, for example:
<a href="<# Link #>"><%= MySolution.Resources.DefaultResources.ViewMore %></a>
Also , why I don't see any system name for "Excerpt" in the BlogList.ascx in template folder ? Then how come the webpart takes the content from Excerpt ?
<# Description #> tag is the excerpt which you can find in the template, if you however change it to <# Content #> it would display a full post content.

Regards,
Mario

5
1/14/2013 9:38:05 PM
6018 Reputation 709 Total posts

Mario,

Since I was having problem in making these changes - HERE

I understood everything until adding ReadMore tag in template. After that I am confused...

I don't know what do you mean by "The main differences would be that instead of the BlogPost.ascx template you would be using BlogList.ascx template and instead of overriding ParseBlogPostTemplateTags method in the BlogPostView control you would be overriding the method in the BlogPostList control."

What exactly I have to do when you are saying "overriding" - could you please help me with the code for this customization ?

Could you please locate me where to make changes exactly ? and what changed ?

6
1/14/2013 9:51:56 PM
2218 Reputation 300 Total posts

Hello,

I don't know what do you mean by "The main differences would be that instead of the BlogPost.ascx template you would be using BlogList.ascx template and instead of overriding ParseBlogPostTemplateTags method in the BlogPostView control you would be overriding the method in the BlogPostList control."
It means that you should only override different controls but the steps are generally the same in both scenarios.

What exactly I have to do when you are saying "overriding" - could you please help me with the code for this customization ?
The concept is desribed in the other post, you would need to override the method which I mentioned (ParseBlogPostTemplateTags) and add your custom tag into the hashtable.


Regards,
Mario

7
1/14/2013 11:14:36 PM
6018 Reputation 709 Total posts

Could you please explain me the steps ? with an example in code what exactly I need do you ? PLEASE

I have also replied in the other post...

8
This is a demo site for MonoX. Please visit Mono Software for more info.