We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7207
    • 14 Posts
    Hi, Does anyone know how to set up 10 different resources and link them to 10 users, so that all resources are available to the public for viewing, but only the relevant user can edit the relevant page and nothing else.

    Like so:
    • User 1 - Resource 1
    • User 2 - Resource 2
    • User 3 - Resource 3

    and so on...
      • 7207
      • 14 Posts
      Sorry I have changed the title to make it a little clearer
        • 3749
        • 24,544 Posts
        The easiest way is to create a tree_root_id user setting for each user with the ID of their personal page. They will only see their own page in the Manager.
          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
          • 22446
          • 181 Posts
          Do you have any documentation on how to do this?
            • 3749
            • 24,544 Posts
            Quote from: outdoorsadv at Nov 10, 2010, 03:26 PM

            Do you have any documentation on how to do this?

            1. Go to Security -> Manage Users.
            2. Right-click on the user and select "Update User"
            3. Click on the "Settings" tab.
            4. Click on the "Create New" button.
            Key: tree_root_id
            Name: Tree Root
            Description: Whatever makes sense to you
            Value: (the ID of the user’s page)
            5. Click on "Save"

            Repeat these steps for each user.

            The user will see only the resource with that ID and its descendants in the tree.

            Note that you can use a comma-separated list for tree_root_id (with no spaces in it) to allow the user to see multiple parts of the tree.

            :)



              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
              • 22446
              • 181 Posts
              Thanks
                • 21106
                • 53 Posts
                Wow. I’ve been looking for something like this. I thought you need a plugin to make this possible.

                Now to take it a notch up, is there a way to make it in a way that association of a single page to a user is automatic? For clarity,a user signs up and is automatically assigned a single profile page.

                Thank you.
                  • 3749
                  • 24,544 Posts
                  Yes, it’s definitely possible. It’s in my not-yet-published book, but is too complicated to explain here.

                  IIRC, it involves customizing the user profile page to add a tree_root_id field and adding a plugin that listens to the event that fires when that page is saved.
                    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
                    • 21106
                    • 53 Posts
                    Quote from: BobRay at Nov 15, 2010, 01:17 PM

                    Yes, it’s definitely possible. It’s in my not-yet-published book, but is too complicated to explain here.

                    IIRC, it involves customizing the user profile page to add a tree_root_id field and adding a plugin that listens to the event that fires when that page is saved.


                    Thanks, BobRay!

                    I don’t need it just yet. Maybe in 6 months when we open a "tutor’s" profile page for our little ESL website. We currently have 10 tutors which is easy to manage.

                    I’ll wait for your book!

                    Cheers,

                    Neil

                      • 7207
                      • 14 Posts
                      Thanks BobRay

                      That really helped us out, I’ll be looking forward to that book too.

                      Could you implement something like neil mentioned ’a user signs up and is automatically assigned a single profile page.’

                      Perhaps for a small fee...