We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24032
    • 11 Posts
    Before I launch into my problems, I would like to thank the MODx development team for such a perfect CMS system. Kudos on you good work! grin

    I’m designing the backend (login-only) part of a website, and there are 3 different user groups: Advisors, Students & Parents.
    I have a folder that isn’t in any menus called "Backend". The file structure sort of looks like this:

    *Backend (folder)
    ---*Advisor Backend (folder)
    ------*Advisor Home
    ------*Another Advisor Page
    ---*Parent Backend (folder)
    ------*Parent Home
    ------Another Parent Page
    ---*Student Backend (folder)
    ------*Student Home
    ------Another Student Page

    NOTE: The * signifies invisible (show-in-menu deselected) files/folders.

    Any page under a folder for a group is only accessible by that group (i.e. "Student Home" is only accessible to Students). All files use the same template. In this template, I would call a [!DropMenu!] with a level limit of 2, and a "StartDoc" of "Backend". Then, the menu would (theoretically) bypass the invisible folders and display anything that is marked as visible that the user logged in has access rights to.

    Example:

    Student A logs in, and is taken to "Student Home". In the template for Student Home (which is the same for all files and folders), It calls a [!DropMenu!] with a level limit of 2 and a "StartDoc" of "Backend". The only thing displayed on this student’s menu should be "Another Student Page". However (and heres my problem), nothing comes up >:(

    Is there any way I can get around this block?



    Sorry for the long post... thanks in advance to any response.
      • 7923
      • 4,213 Posts
      Please provide your page id’s (screenshot from the doc tree is the quickest to do) and your exact snippet calls.

      EDIT: also, are you certain that the permissions are set correctly..? because dropmenu hides the documents automatically if the user does not have rights to see the doc.. you could set the document’s public at first to see if there’s something wrong in the permissions..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 24032
        • 11 Posts
        Thanks for the super quick reply grin !!!
        I’m still working on finding a good screen shooting app. The DocID’s are at the very end of each file/folder name.

        Okay:

        *Backend (folder) (28)
        ---*Advisor Backend (folder) (31)
        ------*Advisor Home (37)
        ------*Another Advisor Page (33)
        ---*Parent Backend (folder) (30)
        ------*Parent Home (35)
        ------Another Parent Page (36)
        ---*Student Backend (folder) (29)
        ------*Student Home (32)
        ------Another Student Page (34)

        Also, when I installed MultiFlex1, it added a few pages w/docID’s 800 and above. Now, whenever I make a new page, it’s in the 800’s huh
        How do I reset this?

        I also tried to tweak with the user permissions, and it didn’t work :’(. They’re all on public now.
          • 7923
          • 4,213 Posts
          Quote from: puki1400 at Sep 17, 2006, 05:07 PM

          The DocID’s are at the very end of each file/folder name.
          And the snippet call(s)? (please copy paste, so they are exactly the same)

          Quote from: puki1400 at Sep 17, 2006, 05:07 PM

          Also, when I installed MultiFlex1, it added a few pages w/docID’s 800 and above. Now, whenever I make a new page, it’s in the 800’s huh
          How do I reset this?
          You can’t.. the ID field is auto increment and it will increment from the largest that it finds.. you could edit the DB table and change those ID’s manually probably if they are not linked to any other resources, eg. TV’s.. I guess.. not sure. No guarantees.. wink


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 24032
            • 11 Posts
            Okay... snippet calls.

            Here it is:

            [!DropMenu? &startDoc=`28` &levelLimit=`2`!]
              • 7923
              • 4,213 Posts
              What happens with levelLimit=`3`?


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 4673
                • 577 Posts
                oopps, the doc ids are my fault.

                If you’re not using those 800 docs just go to phpmyadmin and reset the autoindex count to a number that won’t interfer with your other docs. ie, if they’re all under 100 then 101 would be ok. I’m worried that if you choose something like 50 and you have a doc with 77 that later on down the road when you go to make your next doc and it’s going to be 77 then you might get an error on the db insert.

                It is also possible to hand edit your db but ... it’s a grueling job and requires lot’s of attention to detail.

                sorry and good luck
                  Tangent-Warrior smiley
                  • 24032
                  • 11 Posts
                  Thanks Carsten...

                  Nevermind on the transparent folders. I’ve decided just to make 3 different templates (one for each user type) because they have too many differences to be integrated into one template. embarrassed

                  Thanks much for the support, I will definitely be posting again someday! grin