Paging with Category Filters
In the 4.2 release notes, there is mention of fixing an issue where the documents list was not paging correctly when the list was filtered by a category. (PITS) I am still having this issue but instead of the documents list, I am having this on the News list. I have a category control added to a page and it links to a page with the newsview control. The category is passed in as a route "/-in-Category/category-name" and the filtering is working correctly. But when a category has enough items that it is causing paging, the paging is not picking up on the filter.
Example:
url - "mysite/.../category-name"
paging url - "http://mysite/news/page/2/"
expected paging url - "mysite/.../category-name"
In my example, the expected paging url actually works yet the control renders the url as in the "paging url" mentioned above. Is there some setting that I need to set on the MasterView for the NewsView? Maybe there is a setting in the Pager control I should be setting?
Hi Richard,
To make your news widget working with the category widget when the results from the filter are displayed on several pages you should set UrlEvaluationMode in Advaced settings for the News widget to "QueryString"(see attached image). But in this case your category widget and your news widget should be placed on the same page.
Regards,The problem with the querystring is that you loose the ability to have a clean friendly url. Since the control can read the page number and taxonomy filter as I explained in my post, why can't we use the path UrlEvaluationMode.
Hi Richard Baugh,
I agree that UrlPath is the better solution but then you can't keep the category filter and have paging at the same time. You see - the pager adds segments like /page/2 to the end of the current URL but strips the /-inCategory-/... bits. So if for example you have this URL that filters by "news" category
http://localhost/Release/home-page/-in-Category/Categories/news
in order to get the 2nd page you need this URL
http://localhost/Release/home-page/page/2/-in-Category/Categories/news
but infortunately there isn't a way to configure the pager and the category widget to work together in this way.
Couldn't the pager control check for a ContentView control on the page so that it could get the taxonomy filter if one existed and then append the filter to the end of the url?
Hello Richard Baugh,
Not out of the box. You must override the default logic for the pager - Telerik.Sitefinity.Web.UI.Pager and Pager.ascx. There are 4 controls of type SitefinityHyperLink that are responsible for the previous/next arrows and a <div runat="server"> named sf_pagerNumeric where are rendered the page number links.
Regards,I know I could override the control, but I was hoping that this would be something that would be implemented by SF. All over the forums there is talk about friendly urls. SEO is so important these days that this seems like it should be there.
To me this is still a bug. You allow for the option to use the path UrlEvalutionMode and the control has paging so it should work out of the box. I really hate that I have to tweek the controls that are shipped with SF as you tend to change things with new releases and then we have to spend even more time going back and checking/fixing the overrides so that they work with the newer release. So we double or triple our time for functionality you would expect out of the box. I know you can't foresee all things, but this is frustrating that the options are there, but they only all work when you choose only one of the options.
I do appreciate all of the work that was put into 4.0, just frustrated when things are left out like this.
Hello Richard Baugh,
I understand your frustration. Unfortunately there isn't much I can do about this widget at the moment. I will speak with our developers about extending the capabilities of the pager so it takes into account current filters like ones emitted by the Categories widget. Hopefully this will be fixed for one of the next releases.
Apologies for the inconvenience again.
Hello Chris,
Unfortunately this issue probably won't be fixed for Sitefinity 5. I will try to push this fix for the next version - 5.1.
I logged a new PITS issue so you can track the progress, here is the public URL -
http://www.telerik.com/support/pits.aspx#/public/sitefinity/9577
Apologies for the inconvenience.
Hi Lubomir
Hello Antoine,
What exactly is your module's control? Is your module created with the Module Builder (so the content control is automatically generated) or the module is a static one, created by you (with another assembly) and the content control is custom?
All the best,Hi Svetoslav
Hello Antoine,
Unfortunately this feature has not been implemented for the dynamic content widgets but we are aware of its need and we will work on implementing it for our future releases. I apologize for the inconvenience caused.
Greetings,Using iis7 rewrite rules you can get around a few of the issues mentioned in this thread.
Problem 1
Multiple filters (tag/page) can't be used with a friendly url
Solution
Write a iis rewrite rule that rewrites a friendly url to one using the querystring equivilent, set all controls to evalutate their filters via QueryString
<rule name="Month">