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

    Is it possible to preview a TV image of the next and previous (sub)page?
    I have it working with the next/prev buttons but also want to show an image of that page which is uploaded into a TV of that previous/next page.

      Best CMS eva!
      • 9994
      • 133 Posts
      Can nobody tell me if it’s possible to preview a TV image of a next or previous page?
        Best CMS eva!
        • 23183
        • 102 Posts
        I am trying to use this snippet but each time it is just returning 0 documents and the next and previous are not visible. I have a parent document with the ID 2. On each of the child documents I am inserting this code via a chunk:

        [[PrevJumpNext? &startID=`2` &displayWhat=`menutitle` &includeFolders=`0` &displayFixed=`0` &useJump=`0` &displayTotal=`0` &displayTitle=`1` &sortBy=`pagetitle` &sortHow=`ASC`]]

        [+PJN_first+] [+PJN_prev+] [+PJN_next+] [+PJN_last+]

        and every child document I open it just says: | Index | No more records

        Any idea where im going wrong?

        Thanks
          • 26931
          • 2,314 Posts
          Hi fourroses,

          Is it possible to preview a TV image of the next and previous (sub)page?
          I have it working with the next/prev buttons but also want to show an image of that page which is uploaded into a TV of that previous/next page.
          have a look at this thread:
          http://modxcms.com/forums/index.php/topic,42799.msg256090.html#msg256090
            • 9994
            • 133 Posts
            Thought i gave a reply, anyway thanks allot for ur pinpointing the solution!
            Im not busy on the project at the moment but getting it fixed can’t be that hard now laugh
              Best CMS eva!
              • 23183
              • 102 Posts
              Thanks for this snippet I finally managed to get it working, however I have a found a problem in IE, when I use the drop down list for jump instead of going to example:

              www.mysite.com/cars/red-cars

              its adds an extra directory and goes to:

              www.mysite.com/cars/cars/red-cars

              which does not exists. Anyway I can fix this? Its not happening in Firefox huh

              must have to change something in this part of the code?

              // Jump item
              $PJN_jumpPlaceHolder =
                 '<form action="" name="jump1" style="display:inline;">'
                 . '<select name="myjumpbox" onchange="javascript:if (this.selectedIndex != 0) {var ops=this.getElementsByTagName(\'option\'); var url=ops[this.selectedIndex].getAttribute(\'value\'); if (url) {location.href=url;};}">'
                 . '<option selected="selected">'
                 . $jumpText
                 . '</option>';
                 
              foreach ($my_array as $my_page)
              {
                $PJN_jumpPlaceHolder .=
                   '<option value="[~'
                   . $my_page['id']
                   . '~]" >'
                   . $my_page['pagetitle']
                   . '</option>';
              }
              $PJN_jumpPlaceHolder .= '</select></form>';
              
              // Index item
              $PJN_indexPlaceHolder =
                 '<a href="[~'
                 . $indexDocumentID
                 . '~]">'
                 . $indexText
                 . '</a>';
                • 23183
                • 102 Posts
                Sorry to bump this but can anyone help me with this^

                Im using the code version:

                * Snippet: PrevJumpNextXHTML
                * By: Jeroen Bosch modded by OncleBen31 and modified again by PMS
                * Date: Mar 2008
                * version: 0.3 (based on the PrevJumpNext v0.3)

                My snippet call is:

                [[PrevJumpNext? &sortBy=`pagetitle` &displayTitle=`0` &usePlaceHolder=`true` &indexText=`Return to Stores index` &indexDocumentID=`2` &nextText=`Next Store >` &prevText=`< Prev Store` &jumpText=`Select a store...`  ]]


                In IE the jump feature is duplicating a directory in the URL path
                  • 4429
                  • 429 Posts
                  As soon as i add the snippet call to one of my pages I get a parsing error. it doesn’t matter what parameters etc.. i use i get this error


                  « MODx Parse Error »
                  MODx encountered the following error while attempting to parse the requested resource:
                  « PHP Parse Error »
                   
                  PHP error debug
                    Error: 	Invalid argument supplied for foreach()	 
                    Error type/ Nr.: 	Warning - 2	 
                    File: 	/home/x0149128/public_html/fruitfulthoughts.co.uk/manager/includes/document.parser.class.inc.php(769) : eval()'d code	 
                    Line: 	389	 
                   
                  Parser timing
                    MySQL: 	0.0053 s	(24 Requests)
                    PHP: 	0.1308 s	 
                    Total: 	0.1361 
                    • 23183
                    • 102 Posts
                    try using the older version of the snippet:

                    * Snippet: PrevJumpNextXHTML
                    * By: Jeroen Bosch modded by OncleBen31 and modified again by PMS
                    * Date: Mar 2008
                    * version: 0.3 (based on the PrevJumpNext v0.3)

                    Also to those whoever experience the problem of the URL adding an extra folder, simple fix, put this at the front of the value: ../
                      • 4429
                      • 429 Posts
                      Quote from: PH!L at Dec 10, 2009, 04:15 PM

                      try using the older version of the snippet:

                      * Snippet: PrevJumpNextXHTML
                      * By: Jeroen Bosch modded by OncleBen31 and modified again by PMS
                      * Date: Mar 2008
                      * version: 0.3 (based on the PrevJumpNext v0.3)

                      Also to those whoever experience the problem of the URL adding an extra folder, simple fix, put this at the front of the value: ../

                      Confirmed version 0.3 works like a charm. Thank you