We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17705
    • 501 Posts
    Hi!

    I can not find any documentation for @document (evo)
    I am using things like @document 33, that gets the "content" information of that document...

    but, what about accessing to any other TV of that document? can that be done using @document?


      • 33337
      • 3,975 Posts
      See getField snippet in the extras section smiley
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 17705
        • 501 Posts
        interesting zi!

        I have tried it... but I do not think it helps me... as it shows the content as it is...
        I was using @document to show "globally" a maxigallery... using that the content is parsed, and it shows the gallery content...

        edit: maybe using this http://modxcms.com/extras/package/?package=115 DynContent....
        and having the gallery in its own document (as it is just one)... should do the trick...
          • 33337
          • 3,975 Posts
          If you explain what you want to achieve, maybe I can help better.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 17705
            • 501 Posts
            well, I want to show the same maxigallery in a lot of pages (all the site, almost)
            I have it working...
            using the maxigallery call in the [*content*] field of a document...
            and then, retrieving the gallery in other templates using @document XX

            just trying to do it in a better way
              • 33337
              • 3,975 Posts
              If it works for you, then its "better way" I think. smiley

              Remember, in MODx you can do 1 thing in several ways.
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 3749
                • 24,544 Posts
                I can think of some other ways, but I’m not sure they’re any better.

                You could put the MaxiGallery tag in the template and just use a different template for the pages where you don’t want it to show. That would be faster and more efficient, but it might be harder to maintain.

                You could also use a TV (ShowMG) set to "Yes" or "No" and use a snippet in your template that checks that TV and returns the MaxiGallery tag on the pages where you want it to show and nothing on the others.

                It could also be done with a PHX conditional in the MaxiGallery tag in the template.

                That said, I don’t see anything seriously wrong with what you are doing and the speed differences would probably be trivial, especially if the pages are cached.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  What about a chunk containing the call to MaxiGallery?

                  Perhaps combined with something like a ShowMG TV as Bob mentions.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.