On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello

    I have a need for Wayfinder to include specific Document Groups to the public visitor. The composition of these Doc Groups will vary dynamically so the &includeDocs parameter is inappropriate.

    For background, please see
    http://modxcms.com/forums/index.php/topic,28082.0.html

    I have no idea how much to pay for this adaptation but am completely happy for the code to be made available for all. I can see it perhaps becoming core functionality one day. Basically, I would like to include/exclude specific Doc Groups in the Wayfinder call.

    I guess I would need some form of invoice and I would pay via Paypal.

    If anyone can give me some rough estimates on price and delivery then that would be very helpful.

    Leapy
    • Do you mean that some private docs should appear in the menu and some should not and that you would like a parameter that overides the default of private not showing.
      Something like &showPrivate for certain docs, while the other private docs stay hidden unless logged in as a web user?
      • Hello

        Thanks for asking for clarification.  Your suggestion in my original post covers my needs now but I can envisage a time when that could change. It would be great to have the additional functionality already available at that time.

        My ideal scenario would be to have a &showPrivate (?) parameter which accepts a comma-separated list of specific Document Groups to include within the menu tree. This way I can have menu links to certain private Documents Groups visible to public visitors but, as usual, others would only be visible to logged-in visitors with appropriate access rights.

        Given the above, I don’t think an &hidePrivate is necessary.

        Does that make sense? If not, let me know....

        Thanks

        Leapy
        • Okay I see what you mean.
          I’ll have a look next week and see if that’s achievable.
          • Another way to do it would be to simply leave the documents that should show in the public menus out of the document group and use a snippet on those documents to redirect unauthorized users instead, i.e.
            <?php
            if (!$modx->isMemberOfWebGroup(array('Group1', 'Group2'))) {
                $modx->sendUnauthorizedPage();
            }
            ?>
            • hello

              sorry, have been away

              thanks for the tip but I need this automated along the lines discussed

              unless I misunderstand it, Jason’s solution would require me manually calling the snippet on non-public pages. these pages are going to be created dynamically by users - some to be visible in public menus, others to be hidden. many may start ’invisible’ and then migrate to ’public’ over time. it would be a nightmare to manage! smiley

              the offer still stands if anyone fancies a go at building adapting wayfinder to do what I need...

              thanks all
              • unless I misunderstand it, Jason’s solution would require me manually calling the snippet on non-public pages. these pages are going to be created dynamically by users - some to be visible in public menus, others to be hidden. many may start ’invisible’ and then migrate to ’public’ over time. it would be a nightmare to manage! smiley
                Not quite, you would only need to add the snippet to the template and it would automatically redirect if the user was not a member of group defined in the snippet.

                Edit: fixed typo
                  [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                  Something is happening here, but you don&#39;t know what it is.
                  Do you, Mr. Jones? - [bob dylan]
                • a ha!

                  thanks, Shane

                  you can tell that I am new to all this! I will have to have a play and see if this will do it....

                  L
                  • Quote from: OpenGeek at Aug 17, 2008, 10:10 PM

                    <?php
                    if (!$modx->isMemberOfWebGroup(array('Group1', 'Group2'))) {
                        $modx->sendUnauthorizedPage();
                    }
                    ?>


                    This worked for me nicely (Thanks Jason), except that my login form toggles to logout message instead of showing content.