We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10358
    • 19 Posts
    how do i include a document to another document?

    example: if i have a page named BLA and i want to include the page BOO to him

    how do i do it?


    tnx ahead :]
      • 7231
      • 4,205 Posts
      Do you mean include the content from one document on another document? You can do this in a few different ways. With a snippet like Ditto or GetField. Or you could bind a TV to a document ussing the @DOCUMENT binder.
        [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't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 10358
        • 19 Posts
        i still dont understand how to do this...

        i searched dippo and GetField on the site.... from what i’ve understanded, its not what im looking for.

        i just want to include the content from one document on another document..

        i tried to put this in a new document:
        @DOCUMENT 12
        it does not works .... it shows me this text:
        @DOCUMENT 12
        instead of including the page....any idea way?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          1. Create a new Template Variable. Name it what you like, say IncludeDoc. As the default value, put @DOCUMENT 12.

          2. In the document where you want this displayed, put the TV tags [*includeDoc*]. Now the content of document 12 will be inserted where you put the TV tags.
            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
            • 16034
            • 107 Posts
            And a little intermediate step (which could also be done afterwards but I think it’s more logical to put it in between)
            1.5 When you create the TV tick off template access for the template where you’ll use [*includeDoc*]
              MODx snippet-glossary 101:
              Ditto = Content Lister -- Wayfinder == Menu Builder -- Jot = Comment Control
              • 10358
              • 19 Posts
              sottwell: i did exactly what you sain 3 times already.... its not showing my include sad

              Kleist: i dident understand what you are trying to say....
              not o put any template? offcourse man ;]
                • 16034
                • 107 Posts
                When you edit your template variable, go to the section called "Template Access" and put a check-mark at the template where you want to use your template variable.

                (If you don’t it will not be available, and no output will be shown.)
                  MODx snippet-glossary 101:
                  Ditto = Content Lister -- Wayfinder == Menu Builder -- Jot = Comment Control
                  • 10358
                  • 19 Posts
                  OK now i can see that the [*blablabla*] works.
                  cause its shows me "Unable to locate document 12" no matter what page id i put ...

                  =\
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Is document #12 published? Or was it assigned to a document group you don’t have permission to view?
                      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
                      • 10358
                      • 19 Posts
                      offcourse hes published man