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

    Quote from: maciej.m at Feb 28, 2010, 05:32 PM

    2. Navigation disapears upon refreshing browser
    I cannot reproduce this behavior, at least not with getpage-1.0.0-beta2. Can you post the content of the Resource containing the call to getPage? Maybe I can determine some other cause...

    I’ve just come across this problem and it’s apparently caused when the getPage call doesn’t have an "!". i.e. [[getPage? ... rather than [[!getPage? ...

    If this is the case across the board and ! is always needed, you should know that the first code shown under "Usage" doesn’t use an ! either: http://rtfm.modx.com/display/ADDON/getPage#getPage-Usage

    Also please make a note of this under usage rather than just amending if ! is always needed -- I’ve spent a while trying to solve this problem and I’m sure others will fall into the same trap sooner or later.

    I’m running 2.0.4-pl2 and the latest getPage (downloaded today).
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: rossob at Nov 01, 2010, 02:19 PM

      I’ve just come across this problem and it’s apparently caused when the getPage call doesn’t have an "!". i.e. [[getPage? ... rather than [[!getPage? ...

      If this is the case across the board and ! is always needed, you should know that the first code shown under "Usage" doesn’t use an ! either: http://rtfm.modx.com/display/ADDON/getPage#getPage-Usage

      Also please make a note of this under usage rather than just amending if ! is always needed -- I’ve spent a while trying to solve this problem and I’m sure others will fall into the same trap sooner or later.
      Thanks for the feedback.

      I’ve added the ! token, and made an additional warning under the Usage example, but do note that it is valid to call getPage without the non-cacheable token, i.e. !, if you are calling it on a Resource that is not cacheable itself.
        • 30703
        • 51 Posts
        I’m having a lot of trouble with pagination, I am building a mini-site and I simply want "<< prev | next >>" links.

        I’ve tried:

        • getPage with getResources
        • getResources
        • Wayfinder

        but I can’t seem to get the results I want. Is there a simple way to get the next/prev resource in the site tree?

          Tom Dyer

          Designer/Animator/Web Developer - England, UK.
          http://www.bespokepixels.co.uk
          • 9995
          • 1,613 Posts
          Seen this in an other threat: http://modx.com/extras/package/selflink
          Works very well!

          #EDIT

          Some css styling for getPage:

          <style>
          .paging ul{list-style:none; margin:0; padding:0; float:right; font-size:11px;}
          .pageList li{float:left;}
          .pageList li a{color:#fff; display:block; padding:0px 7px; margin-left:4px; background-color:#000; font-weight:normal; text-decoration:none;}
          .pageList li a:hover{color:#000; background-color:#fff;}
          a.active {color:#000; background-color:#f00!important; }
          a:hover.active {color:#fff!important;}
          </style>
          

          <div class="paging">
          <ul class="pageList">
          [[!+page.nav]]
          </ul>
          </div>

          <div class="clear"></div>
            Evolution user, I like the back-end speed and simplicity smiley