We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24530
    • 100 Posts
    Hi!
    In my Template I use a menu which should show some shortcuts to documents specified by a TV. It is possible to choose ANY document of the site, no matter which parent it has.

    An example would be:
    [!Wayfinder? &startId=`1`&includeDocs=`2,5,6` &ignoreHidden=`true` &sortBy=`published`!]


    In this case the document-tree looks like:

    id1
    |-id2
    | |-id3
    |-id4
    |-id5
    |-id6

    The output only includes the document id2 ... if I change to &startId=`4` it will not show document id2. Any ideas how to solve this problem? Is there an option "ignoreParent"?

    Thank you for your help ...

    Tobias



    Wayfinder 2.0 – ModX 0.9.6 RC1


    [EDIT]

    My solution for this Problem: hacking Wayfinder

    I changed following Lines in wayfinder.raum.inc.php

    Line 314
    $fields = "sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.parent, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,if(sc.type='reference',sc.content,'') as content, sc.template, sc.link_attributes";

    changed to
    $fields = "sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,if(sc.type='reference',sc.content,'') as content, sc.template, sc.link_attributes";


    Line 325-327
    			if ($this->_config['includeDocs']) {
    				$menuWhere .= " AND sc.id IN ({$this->_config['includeDocs']})";
    			}

    changed to
    			if ($this->_config['includeDocs']) {
    				$menuWhere .= " AND sc.id IN ({$this->_config['includeDocs']})";
    			} else {$fields .= ', sc.parent';}	


    now Wayfinder ignores parent when you use includeDocs ...

    [/EDIT]
      my newest webpage [url=http://gitarren.zucali.at]Meisterwerkstatt f
      • 27406
      • 12 Posts
      Hey

      Well I’m no expert, but I’ve been recently playing with Wayfinder quite a bit.

      I’m not exactly sure what you’re after, but I think maybe &ignoreHidden=`false` is what you need in there

      And you can exclude with &excludeDocs

      And make sure you have 2.0 as some of those commands probably don’t work with 1.0 etc.

      List of 2.0 parameters are here http://www.muddydogpaws.com/development/wayfinder/parameters.html

      Let me know if that helps
        • 24530
        • 100 Posts
        Hi!
        &ignoreHidden just shows hidden files, but will not help to show sub-documents without showing the their parent ... any other ideas? Do I reallly have to write my own Snippet?

        @sitesbycal: Thanks for your help ...
        and I use Wayfinder 2.0 and ModX 0.9.6 RC1 ...
          my newest webpage [url=http://gitarren.zucali.at]Meisterwerkstatt f
          • 24530
          • 100 Posts
          now it works!
          see the very first post!
            my newest webpage [url=http://gitarren.zucali.at]Meisterwerkstatt f
            • 16879
            • 87 Posts
            Thanks for this - I need it to work this way also. Just remember to change startid to 0...