We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24191
    • 7 Posts
    We have multiple documents that have the same content but must resided in different locations under the navigation scheme. For example:

    Home (1)
    Parent1 (2)
    Child1_2 (2)
    Child1_2 (1)
    Parent2 (1)
    Child2_1 (1)
    Child2_2 (1)

    Child2_1 and Child1_2 have the same content but must maintain independent navigational hierarchy. In essence, I want two documents where the second, Child2_1, simply references the content of the other document, Child1_2.

    What I’ve tried
    --------------
    1) I tried a weblink by linking the Child2_1 to Child1_2, but was unable to keep the Child2_1’s navigation active. It simply linked to the other page. I hoped for the option to reference the content link instead of actively moving to that link.

    2) I tried to find information about various objects, like the $Modx object, in the hope to build a snippet that reference a "DocumentId" parameter and the associated "content" property. No luck. I found various articles referencing the ModX object along with other objects, but couldn’t find an exhaustive list of classes, properties and methods available to a snippet.

    I figure I’m missing something obvious. After a few hours of digging in the forest, I figure I can’t see the trees anymore.

    Thanks,

    Quad

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If the content is just HTML or text (no modx tags) you can use a TV with @DOCUMENT to pull the given document’s 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
        • 10449
        • 956 Posts
        You can also try the GetField snippet. [!getField? &docid=`123` &field=`content`!]
        Or even Ditto. The Ditto template-chunk would then only be [+content+]

        With MODx, there’s always more than one way to get to Rome smiley
          • 24191
          • 7 Posts
          Genius, the getField snippet worked wonderfully. And the forum response time to my question, scary good.

          Thank you.

          (When I have time, I will learn the other 2 methods.)