We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27843
    • 170 Posts
    Hi,

    in one my project i’m using ajaxsearch with ajaxSearch=`0` and when the result of search have only one page, so paging isn’t displayied

    How can i force to show paging everytime ?

    Thank you for any sugesstions and advices
      • 5811
      • 1,717 Posts
      In classes/ajaxSearch.class.inc.php, line #536 replace:
      $resultPagingText = ($nbrs>$grabMax) ? $this->_lang['as_paginationTextMultiplePages'] : $this->_lang['as_paginationTextSinglePage'] ;
      by
      $resultPagingText = $this->_lang['as_paginationTextMultiplePages'] ;
      and line #540 :
      for ( $nrp = 0; $nrp < $nbrs && $nbrs > $grabMax; $nrp += $grabMax ){
      by
      for ( $nrp = 0; $nrp < $nbrs; $nrp += $grabMax ){


      In return thanks for your contribution for the update of the slovak language file for Ajaxsearch.
      See http://modxcms.com/forums/index.php/topic,33520.msg203918.html#msg203918
        • 27843
        • 170 Posts
        Do you plan add some setting to the snippet call ? if not i can create patch for this, but pls tell me, what name should i use for settign param

        Thank you

        Quote from: coroico at Mar 12, 2009, 05:38 PM

        In return thanks for your contribution for the update of the slovak language file for Ajaxsearch.
        See http://modxcms.com/forums/index.php/topic,33520.msg203918.html#msg203918

        Ok, i will upgrade this
          • 27843
          • 170 Posts
          Quote from: coroico at Mar 12, 2009, 05:38 PM

          In classes/ajaxSearch.class.inc.php, line #536 replace:
          $resultPagingText = ($nbrs>$grabMax) ? $this->_lang['as_paginationTextMultiplePages'] : $this->_lang['as_paginationTextSinglePage'] ;
          by
          $resultPagingText = $this->_lang['as_paginationTextMultiplePages'] ;
          and line #540 :
          for ( $nrp = 0; $nrp < $nbrs && $nbrs > $grabMax; $nrp += $grabMax ){
          by
          for ( $nrp = 0; $nrp < $nbrs; $nrp += $grabMax ){


          In return thanks for your contribution for the update of the slovak language file for Ajaxsearch.
          See http://modxcms.com/forums/index.php/topic,33520.msg203918.html#msg203918


          Thank you very much, this works perfectly
            • 27843
            • 170 Posts
            Quote from: snop at Mar 13, 2009, 06:50 AM

            if not i can create patch for this, but pls tell me, what name should i use for setting param

            I’m suggesting paginateAlwaysShowLinks as using Ditto for always show pagination
              • 5811
              • 1,717 Posts
              paginateAlwaysShowLinks is a bit long parameter name sad May be showPagingAlways is shorter and enought no ?
                • 27843
                • 170 Posts
                Quote from: coroico at Mar 13, 2009, 05:07 PM

                paginateAlwaysShowLinks is a bit long parameter name sad May be showPagingAlways is shorter and enought no ?

                Hi,

                so the patch is created, it works good.

                I have changed snippet file in modx install/ too and the patch is against latest MODx 1.0 branch (Evolution)

                Sry, here is the link wink:
                http://svn.modxcms.com/crucible/cru/CR-MODX-55/preview

                I’m attaching the patch here too
                  • 5811
                  • 1,717 Posts
                  New feature request registered as AJAXSEARCH-28

                  Snop: Thks for the patch.
                  Regarding the improvement of the template, I coming back to you as soon as I integrate the patch in the next release.