Custom Routing with no UrlKeyPrefix in Hybrid mode

Posted by Community Admin on 04-Aug-2018 10:40

Custom Routing with no UrlKeyPrefix in Hybrid mode

All Replies

Posted by Community Admin on 27-Aug-2013 00:00

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 www.sitefinity.com/.../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

Posted by Community Admin on 30-Aug-2013 00:00

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

Posted by Community Admin on 19-Oct-2015 00:00

Wonderful another broken link to something that I really need. Is it that difficult to support older URLs???

Posted by Community Admin on 20-Oct-2015 00:00

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
 

This thread is closed