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

    I'm having some problems with my navigation structure i think. I have the following setup:

    Page 1
    Page 2
    Page 3
    Page 1
    Page 1

    My top navigation doesn't show the Page 3's. The page 3's are shown at my Page 2 via a submenu. The wayfinder call for that submenu is:
    [[WayFinder? &startId=`[[UltimateParent? &topLevel=`3`]]` &ignoreHidden=`1` &outerClass=`links`]]
    .

    When i visit Page 2 my URL says: www.mysite.com/page1/page2. But here's my problem; when i visit Page 3 my url says: www.mysite.com/page3.. So it doesn't show the page2 anymore?

    I'm using Modx Revo 2.2.16. all packages updated. If you need more information please ask.

    I really appreciate any help provided.

    Coen
      • 22427
      • 793 Posts
      There is a System Setting with key "use_alias_path". Maybe you want to set this to "Yes".

      Anyway: Double check your .htaccess to enable Friendly URLs correctly.
        • 40906
        • 23 Posts
        Quote from: ottogal at Nov 10, 2014, 05:40 PM
        There is a System Setting with key "use_alias_path". Maybe you want to set this to "Yes".

        Anyway: Double check your .htaccess to enable Friendly URLs correctly.

        Thank you for answering but i'm aware of this setting. It works for the page1 and page2 documents. I think it has something to do with the submenu? Could it be because of the ultimate parent? I don't really know how that works. Does UltimateParent set the startid for that menu to 0? So everything after that starts like www.mysite.com/page3?

        Thanks.
          • 22427
          • 793 Posts
          In the source code of the UltimateParent snippet you find this comment:
          /**
          * @name UltimateParent
          * @version 1.3
          * @author Susan Ottwell <[email protected]> March 2006
          * @author Al B <> May 18, 2007
          * @author S. Hamblett <[email protected]>
          * @author Shaun McCormick <[email protected]>
          * @author Jason Coward <[email protected]>
          *
          * @param &id The id of the document whose parent you want to find.
          * @param &top The top node for the search.
          * @param &topLevel The top level node for the search (root = level 1)
          *
          * @license Public Domain, use as you like.
          *
          * @example [[UltimateParent? &id=`45` &top=`6`]]
          * Will find the ultimate parent of document 45 if it is a child of document 6;
          * otherwise it will return 45.
          *
          * @example [[UltimateParent? &topLevel=`2`]]
          * Will find the ultimate parent of the current document at a depth of 2 levels
          * in the document hierarchy, with the root level being level 1.
          *
          * This snippet travels up the document tree from a specified document and
          * returns the "ultimate" parent. Version 2.0 was rewritten to use the new
          * getParentIds function features available only in MODx 0.9.5 or later.
          *
          * Based on the original UltimateParent 1.x snippet by Susan Ottwell
          * <[email protected]>. The topLevel parameter was introduced by staed and
          * adopted here.
          */
          Might be helpful.