More in this section

Forums / General Discussions / Blog post URLs

Blog post URLs

2 posts, 0 answered
  1. Dave
    Dave avatar
    29 posts
    31 Oct 2011
    19 Jan 2012
    Link to this post
    I've added a page ~/Blog with a Blog Posts widget which correctly displays entries from my blog.
    However, the title URLs link to, for example,


    as opposed to


    I'm not sure why "blog" is prepended twice to the beginning of the URL. How can I alter this behavior?

    Also, I'd like to add a list of recent posts in the right hand column of the page. This works using the Blog Lists widget however, when on a page that displays an individual blog post, the post is expanded in both the list in the right column and the main content area. Suggestions?



  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    19 Jan 2012
    Link to this post
    Hi Dave,

    Regarding the blog post urls, this is because of the way that the Blogs Provider creates urls: It includes both the Blog UrlName and the Blog Post UrlName.

    It is possible to override this behavior, however it does involve creating a new class. Fortunately the process is pretty simple, and is outlined in this post: Custom URL Formats for Sitefinity Content Modules

    In that example, they add an additional provider for the new blog format, however you can also simply replace the type of the existing provider to be the custom one you make. Then all your blog posts will use whatever format you specify, including leaving out the blog name.

    Regarding the list of recent posts, by default a blogpostsview is going to change its rendering type (list vs details) based on the url, which is what you're seeing.

    Fortunately this also can be overriden by changing the ContentViewDisplayMode from "Automatic" to "Master". This property can be set by editing the widget and clicking the "Advanced" button on the bottom right corner of the control designer.

    I hope this is helpful! let me know if you have any questions or encounter any issues!
2 posts, 0 answered