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

    I’m about to put a site together for a client and am considering using modX for the first time. The client operates in both Australia and New Zealand and wants to have a site for each, but they will share a lot of content. Probably 80% of the content will be the same. We need a way to flag content as ’Australia only’, ’New Zealand only’ or both.

    One thought I had was setting up a different user group for each country, then automatically setting the user group on login. Does this sound reasonable for modX, or are there any other ways to implement this?

    p.s. Just stumbled across modX after a couple of weeks hacking the crap out of joomla. If I never see any more inline styles generated in php echo statements it’ll be too soon. Thank god for these modXers looking to do things the right way!
      • 2472
      • 151 Posts
      i would consider making three document trees in the modx back office:

      • content 4 Australia only
      • content 4 New Zealand only
      • common content

      redirect australian url to document index ’Australia only’, idem for NZ...
        A thing of beauty is a joy forever ( John Keats)
        • 26799
        • 177 Posts
        how do you differentiate between AU and NZ on the common pages?, I think your autologin concept is best so far, You could then assign the users to document groups and set up your [[TV]]s to be group specific. this will hide the AU content on a NZ visitor and vise versa.

        I think I’d try to keep it independent of the user groups, by including a snippit that would run logic against the client’s IP and write the corresponding [[TV]] to the page at runtime...

        Hope this helps...

        Gary
        • Quote from: seventhapex at Jul 25, 2006, 03:06 AM

          I think I’d try to keep it independent of the user groups, by including a snippit that would run logic against the client’s IP and write the corresponding [[TV]] to the page at runtime...
          As an English speaker living in a non-English speaking country, I HATE it when a site does this!! At least if you do that, give the user the option of choosing his preference, like Google does. What if your user is visiting and browsing from a friend or relative’s machine, or an Internet cafe?
            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
            • 22815
            • 1,097 Posts
            This thread has possibly deviated from anything that is useful to the original poster.

            To the best of my knowledge, all Australia and New Zealand IPs are now handed out by the same Asia-Pacific agency, which would make this impractical.

            Further, they speak the same language. They all speak English, except the elves as anyone who’s seen LotR knows.

            The first post says "a site for each". The subject is "multi-site MODx". I assume therefore that there are two domains: company.com.au and company.co.nz - and thus which one you visit would determine which site you saw.

            There are two ways of looking at the problem. One is to concentrate on what is different. The other is to concentrate on what is the same.

            The user-group solution is the neatest - if there was a way of automatically logging into a different usergroup based on domain. This would involve hacking MODx, although it might be feasible with a plugin.

            The multi-tree solution works - if your AU Mission Statement page has a snippet call that loads in the content from a specified page. A custom template for "Shared Pages" on a page with the alias au_missionstatement could (in place of document variable calls), call a snippet that loaded the relevant values from a page with the alias common_missionstatement; this would mean each common page would need to be added to each tree but all that would need to be set would be the alias and the template.

            I think there is a snippet that would enable the second method, but it is a bit messy.
              No, I don't know what OpenGeek's saying half the time either.
              MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
              Forum: Where to post threads about add-ons | Forum Rules
              Like MODx? donate (and/or share your resources)
              Like me? See my Amazon wishlist
              MODx "Most Promising CMS" - so appropriate!
              • 18647
              • 5 Posts
              Thanks for all your input, guys.

              Paul - your assumption is correct, there will be company.com.au and company.co.nz. Unfortunately, the .com is being held by someone in Malaysia for no apparent reason... I haven’t actually dived into modX just yet, but when I do I’ll be referring back to your post.

              Cheers,

              Matt