How to change blog post default url format in sitefinity?
I am using sitefinity 7.1. m working on a project who require url of a blog post /blogname/blogpostname instead of this /blogname/12/11/2016/blogpostname.Blog post's default url contain date of post which is not required for our project.I tried many ways as said in sitefinity documents but not worked.Please tell me the correct solution for these issue.Please this is very serious issue.I hope will get write solution.
I followd follwing links :
Issue 2 : Addtional url not accepting url with querystring.
I need to redirect from /blog/a-world-of-planning/2016/03/14/can-i-retire-at-55?ReturnUrl=https%3A%2F%2Fwww.mywealthtrace.com%2Fblog%2Fa-world-of-planning%2F2016%2F03%2F14%2Fcan-i-retire-at-55%3Futm_source%3Dexample.com%26utm_medium%3Dlink%26utm_compaign%3Darticle
these url to /blog/a-world-of-planning/2016/03/14/can-i-retire-at-55
But Additional url property not doing this.
this is also a serious issue ...please consider these also
Thanks in advance.
For first issue i.e. remove date from blog post's url,i followed these link
i created CustomBlogPostUrl.cs file :
public class CustomBlogPostUrl : Telerik.Sitefinity.Modules.Blogs.Data.OpenAccessBlogProvider
/// The URL format string for blog items
public string BlogUrlFormat
/// The URL format string for blog post items
public string BlogPostUrlFormat
public override string GetUrlFormat(Telerik.Sitefinity.GenericContent.Model.ILocatable item)
if (item.GetType() == typeof(Blog))
else if (item.GetType() == typeof(BlogPost))
protected override void Initialize(string providerName, System.Collections.Specialized.NameValueCollection config, Type managerType)
base.Initialize(providerName, config, managerType);
this.BlogUrlFormat = config["blogUrlFormat"];
this.BlogUrlFormat = "/[UrlName]";
this.BlogPostUrlFormat = config["blogPostUrlFormat"];
this.BlogPostUrlFormat = "/[Parent.UrlName]/[UrlName]";
and try to create new custom provider but i dont know how to write "Provider Type" in settings as shown in img given below.
Plz suggest me .
In order to change the default generated urls you need to create and implement your own custom provider, as you already referenced.
The following KB article provides information and references the same blog post :
I have tried this successfully, please observe following screencast:
You can verify and compare whether you have done similar.
Regarding the 2nd item you mention, it is not possible to use a querystring in the additional urls.
There is a Feature Request logged for this:
Here you can you can track its progress and vote to increase its priority.
Thanks for the quick reply.I did changes as shown in video but provider not get registered.dont know why?I attached a screenshot.Please see this.
The error indicates that the provided ProviderType is not correct.
- Did you rebuild your project?
- Is your custom provider class called: CustomProvider?
- Is it located at the project's root?
Please check the above and adjust accordingly.
I am working on staging site . i dont have local project .i did check above conditions and still giving same error.Thanks for ur support.
Please help me .
Thanks in advance.
You will have to rebuild the project for the newly created class to be picked up.
Otherwise, my previously provided screencast and documentation contain all the necessary info.
Should you continue to have problems implementing this I advice you to open a support ticket as it may be required to send us your project data or other detailed info in order to isolate the reason for this issue.
Thanks for your valuable support.I tried changing blog url format on my previous sitfinity local project.And it works. m going to upload on my live project .Hope will work.
Thank you so much.