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

    straight to the point:

    im stucked in a previous-next link problem. (im building a portfolio so this is a must!)
    ive been struggling with with for the past 3 days.

    this is what i have:

    in the template:

    [[!getResources? &parents=`2` &limit=`1` &tpl=`pageprev` &sortby=`menuindex`&sortdir=`ASC`]]

    the chunk:

    <a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a>

    ive read all the documentation, ive googled this, read the modxwiki, etc... and no matter how i try w what i always get is the [id] of the last and the first resource (under parent `2`). always!
    searched this foruns for hours, ive tryied the newest basicnav snippet, with no effort

    is there anyone that can help me out on this one?
    i would be really grateful, im desperated....

    tnx in advanced.

    ps: i need to order by menuindex because my resources ids are all messed up in terms of organization. (i tried by id and the result was the same)
    pps: im using getresources didnt tried ditto.
    pps. ive tried this with getpage and the result was the same.
    ppps: ive got all the resources with hidefrommenu not enable

    rev 206pl
      • 10638
      • 57 Posts
      Hi I believe this can be done using getPage (I tried it just earlier and it seemed to work).

      Can you possibly post your getPage snippet call?
        • 34001
        • 428 Posts
        Hello,
        Quote from: xico at Dec 29, 2010, 10:17 PM

        im stucked in a previous-next link problem. (im building a portfolio so this is a must!)
        « There’s an extra for that.™ » wink
        Give BasicNav a try. You’ll be able to create first, last, previous and next links for your pages.
          Intégrateur web freelance
          • 32868
          • 6 Posts
          ok thanks all

          basically after days of burning out my eyes trying to achieve something that i think it must be easy for a php literated (which is not my case at all, therefor my shout out for help here):
          ive tried getresources and i got an array
          ive tried get page with get resources and i got an array + pagination (a weird one since i only got the first and the last resource of the tree menu)
          ive tried basicnav over and over, no way, it just doesnt outputed any records
          well, i continued burning my eyes a bit more
          and found out the snippet below, i had nothing more to loose (actually i was already searching for a new cms so i could carry on and put my site online, since is a bit frustrating to have it all done and working besides this little annoying prev/next thing...)
          so this is a link from 2006 (if you are in modx rev, you just need to correct them back from evo to rev tags)


          http://modxcms.com/forums/index.php/topic,4847.0.html

          i hope this can help anyone in the same situation in the future.
          tnx again
            • 31876
            • 33 Posts
            Hello,

            I need to make links to prev/next docs but also output with their respective "pagetitle",

            I tried to change php code of this snippet, but i’m not happy with php..

            Any help would be appreciated.
              • 25141
              • 49 Posts
              Hi all,

              BasicNav seems to have had some basic problems, now solved in this thread: http://modxcms.com/forums/index.php/topic,59000.msg357995.html#msg357995

              Just update your snippet php code with the code found here, better documentation included.

              Cheers, Rixe