We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    here you will find download - links for mootools and jquery for this paginator:

    http://www.aplusdesign.com.au/blog/ajax-pagination-back-button/
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 19463
      • 4 Posts
      Quote from: Bruno17 at Jun 08, 2012, 06:06 AM
      here you will find download - links for mootools and jquery for this paginator:

      http://www.aplusdesign.com.au/blog/ajax-pagination-back-button/

      Well, now I can see and use paginator controls in the controls div, but content div still empty (http://km-ltd.com/fond/контакты.html). I have checked helper page (http://km-ltd.com/fond/ajaxpage.html), and it looks like it makes json ready content so backend part of snippet works well. Did you make any changes in snippet source?
        • 36985
        • 9 Posts
        I got this to work with mootools, but i want it to work with jquery

        Tried this:

        Added jquery files to the server ajaxgetpage/js
        Tried adding this to the snippet

        "<script>
        $(document).ready(function() {
        new Paginator('{$url}',{qString : '?page='});
        });
        </script>"

        Also replacing $modx->regClientStartupScript($modx->getOption('assets_url').'components/ajaxgetpage/js/jquery-1.4.2.min.js');

        cant get it to work can anyone please share how they got it to work with jquery?

        Also would it be possible to add a title to every number like this :
        <a href="ajagetpage/?page=3"  title="fetched from subpage" >3</a>


        [ed. note: wrkwrk last edited this post 11 years, 7 months ago.]
          • 36985
          • 9 Posts
          Also would it be possible to add custom classes a or li
          <a href="ajagetpage/?page=3" class="fetched from template variable"  title="fetched from subpage" >3</a>

            • 40762
            • 54 Posts
            Hello, I am also trying to make this thing work in jquery. I feel that

            $page = '<div class="paginated" id="" '.$paginatedStyle.'>'.$page.'</div>';


            is only wrapping the first element. I dont know if its normal behavior but it seems like not.

            Also, the page seems to be loading two times in a row.

            And
            $_REQUEST['page'];
            $_REQUEST['current'];
            outputs me the same var.


            Hope some body could help us on those things/Explain this behavior

            Thanks [ed. note: markodey last edited this post 11 years, 7 months ago.]
              Marc-Andre Audet
              • 40762
              • 54 Posts
              If any body encoutered problems with this implementation I would be glad to here from you guys.
              On my side I found one little mistake concerning a jquery selector.

              var first = this.pContent.find("div:first"),
              		last = this.pContent.find("div:last");


              When using div inside the element, the selector selects the very last element declared without considering nesting. So what I did is "


              var first = this.pContent.find("div:first"),
              		last = this.pContent.find("div:last-child");


              Now what moves is what needs to move.

              I also had a multiple firering of a request which didnt look too good. What I did, added this conditional statement

              ...this.pControls.html(res.pagination);
                                if(this.lastPage != res.current){
              [ed. note: markodey last edited this post 11 years, 7 months ago.]
                Marc-Andre Audet
                • 35756
                • 166 Posts
                Hi there!

                I'm using the snippet from Bruno (reply#11) and it's working well so far. The only issue I've got is, that when I activate the DirectResizeRevo-Plugin the source-code gets messed up like this:

                <img "283"="" "200"="" alt="title" src="images/image.jpg" style="float: right;">


                but it has to be

                <img height="283" width="200" alt="title" src="images/image.jpg" style="float: right;">


                The height and width attributes are messed up...

                How can I resolve this problem? Any idea anyone?

                Cheers in advance! [ed. note: profilneurotiker last edited this post 11 years, 4 months ago.]
                  • 42035
                  • 90 Posts
                  Hello Everybody

                  I am newer in modx and reach to complete my first project.
                  In my Project i have one issue after using storeLocator and getPage.

                  I get the pagination after load the store locator page but when search the store get proper result and all the store related to searching.

                  But after Search Result cant get the pagination.
                  So give me solution about this issue it will be helpful to me in my project and future.

                  Also Provide information how to use ajaxGetpage in storeLocator for Pagination.
                    Arkalp.com
                    • 38189
                    • 31 Posts
                    I don't know what I am doing wrong but every time I do the snippet call I get this:

                    ( ! ) Notice: Undefined variable: ajax in C:\wamp\www\****\core\cache\includes\elements\modsnippet\66.include.cache.php on line 7


                    I know it's referring to the "$ajax" variable inside the snippet code, and I am well aware this thread is almost 3 years old but I am sure someone out there from the guru's can help me solve this little conundrum.

                    I copied and pasted everything in here as explained by Bruno and in my mind "it should work". I am assuming the $ajax value is taken from the final snippet call within the resource i'd like the contents to display when one makes this call:

                    [[!ajaxGetPage? 
                    &ajax=`1` //Is this where it gets the value to then process the 'IF' statement inside the snippet?
                    &sortBy=`id`
                       &elementClass=`modSnippet`
                       &element=`getResources`
                       &limit=`4`
                       &pageVarKey=`page`
                       &tpl=`adresse`
                       &parents=`11`
                       &includeTVs=`1`
                       &processTVs=`1`
                     
                    ]]
                    


                    I am assuming that's where it's getting it, or is there something I am absolutely n00bish like I am missing?
                      • 40762
                      • 54 Posts
                      you can use isset($varname) or

                      $varname=$modx->getOption('varname',$scriptProperties,'value');

                      the first one is only php the second on ensure that if it has no value it will create one with the desired value
                        Marc-Andre Audet