We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1841
    • 141 Posts
    tried sibling nav again and it just won't break out of the folder to go to the next resource.
      • 4172
      • 5,888 Posts
      whats your siblingNav snippet-call?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 1841
        • 141 Posts
        I've tried using every combination imaginable, including the &parents, the &id etc but nothing has worked, it simply can't go through folders to show results in those folders.

        What I am after is a previous / next navigation that can look through the folders and return the next / prev resources while going to the children of the next and previous folders when applicable. The Evolution snippet Navigator worked like a dream but none of the Revolution snippets seem to be able to do the same.

        As an example of what I am trying to do, this is the folder structure of the site:

        parent 1 >>
        child 1
        child 2
        child 3
        parent 2 >>
        child 4
        child 5
        child 6
        parent 3 >>
        sub-parent 1 >>
        child 7
        child 8
        child 9

        So looking at this structure, I am trying to return the previous next for the children only but going to the child in the next folder when applicable. The only thing I can get BasicNav and siblingNav to do is return pages of one level, so all the parents or the children of one parent.
          • 1841
          • 141 Posts
          Anybody got any ideas on how to get this to work?
            • 4172
            • 5,888 Posts
            Can only repeat:
            with siblingNav its possible with the &parents - property.

            may be you will need the latest from github
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 1841
              • 141 Posts
              Hi Bruno17,

              Thanks for the reply but the minute I try and specify a parent with more than a few resources it causes the pages to time out. SiblingNav is just too slow.

              Basic nav works great if we could just get it to go to the next child in a folder...
                • 19872
                • 1,078 Posts
                I'm a bit late to the game here perhaps—but have updated the BasicNav code to reflect the contributions up to dflock and can't for the life of me get anything to appear.

                source view shows: <div class="nav"></div>
                I'm using the suggested, full snippet call.

                My resources are within a folder that is I guess would be called 3 levels deep.
                i.e. Main Menu > Product Category > Product Page.

                I'm inserting the snippet on the template page for the "Product Pages"

                Has anyone been able to get this to work in Revolution 2.2.2?

                Or... is there an alternative for achieving the same goal?
                  • 16263
                  • 4 Posts
                  BasicNav provides two options for output. To a placeholder if you specify &placeholder=`1`, or to return the output inline by either not providing input for &placeholder, or by explicitly setting &placeholder=`0`.

                  There is an issue with this.

                  Around line 15 of the BasicNav snippet is this line:

                  $placeholder = !empty($placeholder) ? $placeholder : TRUE;


                  If placeholder is set, then use its value. If it's not set, evaluate to true.

                  However, when you pass in "0" as a parameter in the snippet call, it is sent in as a string, which evaluates to true later in the code.

                  if ($placeholder) {
                  	$modx->setPlaceholder('basicnav', $result);
                  	return;
                  } else {
                  	return $result;
                  }


                  A suggested fix:

                  $placeholder = !empty($placeholder) ? (bool)$placeholder : TRUE;


                  This casts the placeholder parameter to a boolean so that it can be properly evaluated to false.

                  Hope this helps someone.
                    • 16263
                    • 4 Posts
                    BasicNav provides two options for output. To a placeholder if you specify &placeholder=`1`, or to return the output inline by either not providing input for &placeholder, or by explicitly setting &placeholder=`0`.

                    There is an issue with this.

                    Around line 15 of the BasicNav snippet is this line:

                    $placeholder = !empty($placeholder) ? $placeholder : TRUE;


                    If placeholder is set, then use its value. If it's not set, evaluate to true.

                    However, when you pass in "0" as a parameter in the snippet call, it is sent in as a string, which evaluates to true later in the code.

                    if ($placeholder) {
                    	$modx->setPlaceholder('basicnav', $result);
                    	return;
                    } else {
                    	return $result;
                    }


                    A suggested fix:

                    $placeholder = !empty($placeholder) ? (bool)$placeholder : TRUE;


                    This casts the placeholder parameter to a boolean so that it can be properly evaluated to false.

                    Hope this helps someone.