We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8461
    • 205 Posts
    It may be a silly question but I cannot see how to do this.

    On my site I have various folders and within each folder (sections) I have a number of documents. Using the dropmenu snippet I can set the startDoc to say 15, which is my company info section.
    [[DropMenu? &startDoc=`0` &levelLimit=`1`&hereClass=`current`&selfAsLink=`1` &removeNewLines=`1`]]


    But can I include the folder itself in my menu also. When I say start at 15 (the folder) the dropmenu lists all the pages (files) within that folder but not the folder itself.

    Many thanks for any assistance and apologies if I am being stupid
    • Not as far as I know; I used weblinks under the folders to link back to the folders themselves.
        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
        • 8461
        • 205 Posts
        Hi Sottwell,

        Ok thanks, how do I do that please, can you point me in the right direction.

        I did not want to create another page as the section home page because I plan to use Newssnippet on the folder page itself 15 in my example) and if I had to create an additional page within this folder then the newssnippet would also list the information from this page.

        I just need to have section home pages somehow which will use newslisting to summarize all the pages within that section

        • Under the folder in question, create a weblink with the url of the page for the folder with the url
          index.php?id=xx


          where xx is the ID of the folder.

          I’ve made a small hack to the parser at line 1046 of document.parser.class.inc.php that will allow for [~xx~] tags in the url field:

          // check whether it's a reference
          if($this->documentObject['type']=="reference") {
              // if it's an internal docid tag, process it
              if(strpos($this->documentObject['content'],'[~') !== false) {
                  // generate a url
                  $this->documentObject['content'] = $this->rewriteUrls($this->documentObject['content']);
              }
              $this->sendRedirect($this->documentObject['content']);
          }
            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
            • 8461
            • 205 Posts
            Thanks, very much appriciated

            I will have a go and see how I get on