We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37165
    • 89 Posts
    I have a multi site set up that is working fine. Each site is a different location of a series of hotels. I have created a context setting called "site_info" that is a hidden resource in each context that has information about the address, logo, etc specific to that context.

    I want to create an "all locations" page that shows all locations regardless of the context. I would like to grab TVs from each "site_info" page and make a new chunk that allows me to format and style as I'd like. What is the best way to go about this? Ideally I'd like to have it so that when new contexts are added they automatically are added to the page. I'm assuming I need a snipet but don't really know PHP.


      • 42562
      • 1,145 Posts
      Multi site, different domains?

      Have you tried getResources yet to see if it works?
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 37165
        • 89 Posts
        Quote from: donshakespeare at Jul 07, 2015, 01:02 PM
        Multi site, different domains?

        Have you tried getResources yet to see if it works?

        yes different domains. Tried getResources but could not find a way to get it work across resources
          • 42562
          • 1,145 Posts
          Tried this parameter?
          &context=`web,hotel1,hotel2,etc`

          Comma-delimited list of context keys to limit results by; if empty, contexts for all specified parents will be used (all contexts if 0 is specified)
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 37165
            • 89 Posts
            Quote from: donshakespeare at Jul 07, 2015, 01:24 PM
            Tried this parameter?
            &context=`web,hotel1,hotel2,etc`

            Comma-delimited list of context keys to limit results by; if empty, contexts for all specified parents will be used (all contexts if 0 is specified)

            I can do that, but I was trying to avoid tying things to resource ids or context keys. Perhaps thats the wrong way to go though. Thanks
              • 42562
              • 1,145 Posts
              .. but I was trying to avoid tying things to resource ids or context keys
              Maybe I am misunderstanding.
              You want one page that has listed links(plus TV content) from all your sites (contexts), right?
              There is no talk of resource ids, just enter in your various contexts you wish to query, and continue on with your getResource call.
                TinymceWrapper: Complete back/frontend content solution.
                Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                • 37165
                • 89 Posts
                Quote from: donshakespeare at Jul 07, 2015, 01:42 PM
                .. but I was trying to avoid tying things to resource ids or context keys
                Maybe I am misunderstanding.
                You want one page that has listed links(plus TV content) from all your sites (contexts), right?
                There is no talk of resource ids, just enter in your various contexts you wish to query, and continue on with your getResource call.

                But don't I have to use the resource ids with the context to access the TVs on the page I want?
                  • 42562
                  • 1,145 Posts
                  You can go by &resources or &parents, to be more general
                    TinymceWrapper: Complete back/frontend content solution.
                    Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                    5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.