We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    That’s how these snippets work, you give them the docID of the parent document and they generate the listing of the children of that document.

    Wayfinder can be configured to include the parent document with the displayStart parameter.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 27968
      • 19 Posts
      Fatal error: Call to undefined function: constructor() in /www/solovets/www/htdocs/solovets/assets/snippets/doclink/doclink.class.inc.php on line 23

      What have I done wrong?
        • 27968
        • 19 Posts
        Quote from: solovets-denis at May 18, 2009, 05:42 AM

        Fatal error: Call to undefined function: constructor() in /www/solovets/www/htdocs/solovets/assets/snippets/doclink/doclink.class.inc.php on line 23

        What have I done wrong?

        The problem was in doclink.class.inc.php:

            // constructor
            function __construct() {
            }
        
            // constructor for PHP4
            function doclink() {
                $this->__constructor();
            }


        The code must be

            // constructor
            function __constructor() {
            }
        
            // constructor for PHP4
            function doclink() {
                $this->__constructor();
            }


          • 23276
          • 85 Posts
          I fixed some issues on 1.0.1

          2009-06-03
          Fixed a fatal error on PHP4.
          Fixed typographical error in default templates.


          (This snippet is still one for a small-scaled use. So it cannot retrieves complex structure yet sad
            • 36527
            • 120 Posts
            Phize,

            If you are around... Is it possible to pass a TV as the parameter to sortby. Namely a date as Unixtime?
              • 23610
              • 37 Posts
              Hi there Phize. Thank you for this great snippet. Found one problem though.
              I can't get &template=`html` to work. When I set "template" to "html" nothing is displayed. When I change it to the name of tpl stored in file - it works perfectly. Here is my snippet call:
              [[DocLink?
              &template=`html`
              &style=`none`
              &sortBy=`menuindex`
              &sortDir=`ASC`
              &hideFolders=`0`
              &tplOuter=`@CODE:[+inner+]`
              &tplInner=`@CODE:[+prev+][+next+]`
              &tplPrev=`@CODE:<div class="prev-next prev"><a href="[(base_url)][+prev.uri+]" title="[+prev.title+]">Previous</a></div>`
              &tplNext=`@CODE:<div class="prev-next next"><a href="[(base_url)][+next.uri+]" title="[+next.title+]">Next</a></div>`]]
              

              Can you help me with that?
              It is latest snippet version on Evo 1.0.5