RadGrid with SEO Enabled in Widget
I created the widget and placed SEO Enabled RadGrid in this widget.
The widget was registered in sitefinity backend and placed on the page.
So far it works good.
But if possible the only one change is required.
When you navigate from page to page it shows the urls in the following format:
(value 2_3 in this case means page 2, show 3 records per page)
We would like to have routed urls in the following format:
Routed URL: http://mydomain.com/classifieds/ads/page/2
Routed URL: http://mydomain.com/classifieds/ads/page/2_3
After looking in RadGrid documentation we found the following information:
To enable routing support for the SEO pager, RadGrid introduces 3 new properties in RadGrid.PagerStyle:
To use URL routing with RadGrid, your application must specify a route to the .aspx page and that route should define a URL parameter specifying the grid page:
Here is the link to documentation page: www.telerik.com/.../grid-seo-paging.html
Unfortunately it didn work.
We tried to register route in global.asax file
And here is PagerStyle settings for RadGrid
<PagerStyle Mode="NextPrevAndNumeric" EnableSEOPaging="true" UseRouting="true" SEORouteName="ClassifiedsPaging" SEOPageIndexRouteParameterName="pageNumber"></PagerStyle>
but received the following error:
route named 'ClassifiedsPaging' could not be found in the route collection.
As far as we know the routing is handled internally by sitefinity.
Does anybody knows if its possible to have Routed Urls for RadGrid in a widget??
You are correct that Sitefinity handles setting up the routing, but this is done internally with the Bootstrapper. You should be able to hook into it with something like this:
Yes this is excactly what I am looking for.
I am not familiar with Bootstrapper and will investigate it over the weekend.
The goal is to use the built in functionality of RadGrid to display nicely Routed URLs for paging.
Of course we understand that is is not crucial for searh engines indexing. However we think it is very important for the end users to have friendly urls.
I will try to use your solution over the weekend.