We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1373
    • 12 Posts
    Quote from: annii at Jan 29, 2008, 04:02 AM

    Hi Amir
    Thanks for this,
    I’ve got the new release working great with pagination in Firefox, but for some reason it crashes ie7 and ie6 (2 different machines) - but only if I include either of the pagination parameters of &perPage and $footer. If I remove them, ie works fine but without pagination.

    Any ideas?

    Thanks

    Anni

    I guess the problem is caused by some sort of ’invalid’ html, produced by the combination of your chunk and what comes after it - the footer or the pagination links.

    I tried it with pagination and footer and it worked fine on ff and ie6.

      • 1751
      • 57 Posts
      Oh Amir embarrassed
      I’m so sorry!!
      My error entirely!
      You were right! I’d put the wrong closing tag in the chunk!

      Thanks anni.....

      I know it’s been mentioned in this thread, but I didn’t know how to follow through on it... but if I want to add the ability to delete a record, I understand that I could merge the output into a form using eform, but I don’t know how to write the php req’d or how to include it. Does anyone have a simple example they’d be willing to share?

      anni
        • 24531
        • 213 Posts
        may be guys from core team would add this snippet to core distribution? cause distrib certainly lacks this type of functionality
          • 27442
          • 103 Posts
          This works nicely, except that pagination doesn’t seem to play nicely with friendly urls. The first page is generated correctly, but the urls to subsequent pages aren’t valid. I get something like http://mysite.example/page1.html?pagestart=21 I’m not sure if there’s any way to fix this with friendly URLs
            • 7231
            • 4,205 Posts
            This is not a problem of the snippet but a characteristic of the friendly urls. This will also happen with Jot pagination, ditto pagination, and any other script that uses the get method.

            Maybe you can do something with the rewrite rules.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 34017
              • 898 Posts
              Add this in there:
              
              if($modx->config['friendly_urls'] == 1) {
                $arg = '?';
              } else {
                $arg = '&';
              }
              
              //Link code here: <a href="linkHere'.$arg.'paginationInfo">text</a><br />';
              


                Chuck the Trukk
                ProWebscape.com :: Nashville-WebDesign.com
                - - - - - - - -
                What are TV's? Here's some info below.
                http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
                • 7231
                • 4,205 Posts
                Oh, I see what you mean. I thought the objective was page1/startpage/21
                  [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                  Something is happening here, but you don&#39;t know what it is.
                  Do you, Mr. Jones? - [bob dylan]
                  • 32645
                  • 377 Posts
                  I am missing a file from your download -- it does not appear in either of your versions.

                  In the code;

                  $ldPath =  $modx->config['base_path'] .  'assets/snippets/loopDbChunk/';
                  include_once($ldPath . 'transformFuncs.php');
                  


                  There is no transformFuncs.php file.

                  Please specify where I can download this file!
                    • 7231
                    • 4,205 Posts
                    I have it from a previous version but it is not included in the package for 1.2 (?)

                    all it has in it is function:
                    <?php
                    
                    function fixImgPath($imgPath) {
                    	return('assets/snippets/loopDbChunk/img/' . $imgPath);
                    }
                    
                     $mapArray = array('imgpath' => 'fixImgPath');
                    
                    ?>

                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 32645
                      • 377 Posts
                      Thanks for your help, I’m going to see if loopDBChunk can help with my specific problem.