+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Routing with no UrlKeyPrefix in Hybrid mode

Custom Routing with no UrlKeyPrefix in Hybrid mode

4 posts, 0 answered
  1. Sam
    Sam avatar
    3 posts
    Registered:
    19 Jul 2013
    27 Aug 2013
    Link to this post
    Hi,

    We currently have a custom widget with an Index Action. The widget is placed on a page (let's call the page: "page-containing-the-widget" for argument's sake). The action takes a parameter of "somevalue". The "somevalue" parameter is passed into the action and drives the content. This all works fine and our URL is as follows:

    /page-containing-the-widget/Index/somevalue

    Simple. However, for SEO and for the sake of having /nice/clean/urls, we want to remove the Index part of the URL. As far as I can see there are 4 solutions to this, each with their own set of issues:

    1. Change the action name - this isn't preferable as it still give us an unnecessary URL part and also requires that all other widgets use the same UrlKeyPrefix

    2. Use the query string - according to this blog post http://www.sitefinity.com/blogs/slavoingilizov/posts/slavo-ingilizovs-blog/2011/12/12/url_filtering_in_built-in_content_widgets this seems to be the way Sitefinity recommend doing it. Again, this is not preferable as we want to do-away with query string params.

    3. Set up a custom route - having following several blog posts and discussions and still failing to achieve this, I'm wondering if it's possible to tap into the Sitefinity routing rules in hybrid mode?

    4. Use a non-dynamic solution such as IIS rewrite rules or simply doing away with the "somevalue" part of the URL and creating pages for each separate content item - this is definitely not a route [kind of pun intended] we want to go down for obvious reasons.

    It seems like something which may need to be done fairly often. In short I don't want a UrlKeyPrefix at all. I just want our content editors to be able to create a page, drag the widget on and then navigate to the url /page-containing-the-widget/somevalue where "somevalue" is pulled in as the url param.

    Does anyone have any advice on this?

    Sam
  2. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    09 Sep 2016
    30 Aug 2013
    Link to this post
    Hi,

    I would suggest you to review the following forum where this topic is discussed:

    www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/mvc-questions#Hky40sE3622pWP8AAERlJg

    Regards,
    Stefani Tacheva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. J
    J avatar
    10 posts
    Registered:
    18 May 2015
    19 Oct 2015 in reply to Stefani Tacheva
    Link to this post
    Wonderful another broken link to something that I really need. Is it that difficult to support older URLs???
  4. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    09 Sep 2016
    20 Oct 2015
    Link to this post
    Hello,

    Please find the working link here.

    Regards,
    Stefani Tacheva
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered