We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25441
    • 60 Posts
    I’ve document and child-document. I want create dynamic link to child document, but i don’t know, how to know child id. [*parent*]-return parent ID, if it exists tag for child id?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      No there isn’t. You’ll need Wayfinder, Ditto, or some other snippet for listing the children of a given container/document.
        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
        • 25441
        • 60 Posts
        Quote from: sottwell at Jul 07, 2009, 08:25 AM

        No there isn’t. You’ll need Wayfinder, Ditto, or some other snippet for listing the children of a given container/document.
        Have you an example?
        I want create link, like this http://site.com/index.php?id=[*id_child*]
          • 7231
          • 4,205 Posts
          The problem is that a document can have several children. And the first child may vary according to the way you are sorting your menus. Is this for a menu? Or is it for something more specific?

          [[Wayfinder]] will generate a <ul> list of children links and you can format the output if needed. But i am not sure of how you want to use this.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don&#39;t know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 25441
            • 60 Posts
            Quote from: dev_cw at Jul 07, 2009, 09:10 AM

            The problem is that a document can have several children. And the first child may vary according to the way you are sorting your menus. Is this for a menu? Or is it for something more specific?

            [[Wayfinder]] will generate a <ul> list of children links and you can format the output if needed. But i am not sure of how you want to use this.
            On my site, i’ve one child, and this child is container of documents.
            Anyway, i try to use wayfinder for solving this problem.

            My menu:
            Root
            -child(page)
            -child(page)
            -child(container)
            --child(page)

            And i want to return "root" and "child(container)" for switch between them