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

Forums / Bugs & Issues / Paging with Category Filters

Paging with Category Filters

15 posts, 0 answered
  1. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    16 Sep 2011
    Link to this post
    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 - "http://mysite/news/-in-category/category-name"
    paging url - "http://mysite/news/page/2/"
    expected paging url - "http://mysite/news/page/2/-in-category/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?
  2. Petya
    Petya avatar
    123 posts
    Registered:
    30 May 2017
    22 Sep 2011
    Link to this post
    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,
    Petya
    the Telerik team
    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. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    22 Sep 2011
    Link to this post
    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.
  4. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    22 Sep 2011
    Link to this post
    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.

    All the best,
    Lubomir Velkov
    the Telerik team
    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
  5. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    22 Sep 2011
    Link to this post
    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?
  6. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    22 Sep 2011
    Link to this post
    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,
    Lubomir Velkov
    the Telerik team
    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
  7. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    22 Sep 2011
    Link to this post
    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.
  8. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    26 Sep 2011
    Link to this post
    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.

    Kind regards,
    Lubomir Velkov
    the Telerik team
    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
  9. HRC
    HRC avatar
    44 posts
    Registered:
    16 Mar 2009
    30 Jan 2012
    Link to this post
    I'm wondering if this issue will be addressed in the next release of Sitefintiy, As of 4.4, it is still a persistent issue. 
  10. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    02 Feb 2012
    Link to this post
    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. 

    Kind regards,
    Lubomir Velkov
    the Telerik team
    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
  11. Antoine
    Antoine avatar
    45 posts
    Registered:
    13 Jul 2012
    29 Feb 2012
    Link to this post
    Hi Lubomir

    The suggested work around resolved the issue for me with News.  However, we have a custom module for which I would like to do the same.  Unfortunately, I do not see a UrlEvaluationMode property that I can change for our custom module widget.

    Is there another workaround?

    Thanks,
    Antoine
  12. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    02 Mar 2012
    Link to this post
    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,
    Svetoslav Petsov
    the Telerik team
    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
  13. Antoine
    Antoine avatar
    45 posts
    Registered:
    13 Jul 2012
    02 Mar 2012
    Link to this post
    Hi Svetoslav

    Good question.  I should have been more specific.  The custom module was built in Sitefinity 4.4 using the Module Builder.

    Antoine
  14. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    07 Mar 2012
    Link to this post
    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,
    Svetoslav Petsov
    the Telerik team
    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
  15. betty
    betty avatar
    19 posts
    Registered:
    12 Apr 2011
    07 Aug 2012
    Link to this post
    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">
    <match url="(.*?)/month/([^/]+)(.*)" />
    <action type="Rewrite" url="{R:1}/{R:3}?month={R:2}" appendQueryString="true" />
    </rule>

    Original:  /news/month/06
    Result: /news?month=06

    Problem 2
    Module builder modules don't support querystring filters

    Solution
    Rewrite incoming filters to use both the UrlPath and QueryString method, this may not work with all filters.  This way controls that support UrlPath (module builder) will pickup on those filters and those that support QueryString will pickup on that.

    <rule name="Rewrite tag filters" preCondition="IsHTML">
           <matchurl="([^?]+)[?](.*?)taxon=([^&amp;]+)(.*)" />
           <action type="Rewrite" value="/{R:1}/in-Tags/{R:3}?{R:2}
    taxon={R:3}
    {R:4}" 
    appendQueryString="true"  
     />
    </rule>

    Original:  /page?taxon=books
    Result: /page/in-Tags/books?taxon=books

    You may also need to write outgoing filters to rewrite your page links to be the new friendly ones your want instead.
15 posts, 0 answered