We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Quote from: vitaliy at Jan 18, 2011, 01:51 PM

    how to display the form only to certain groups of users?

    no. I need to make the page visible to all, and the snippet only worked if I allow a user.

    You can’t do both. Either it’s visible to everyone, or it isn’t.

    I’m afraid I don’t understand what you want to do.

      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
      • 31649
      • 6 Posts
      I want to have a button and the form on the page appears only if you login in the manager
        • 3749
        • 24,544 Posts
        Well, NewsPublisher is a *front-end* editing solution (the Manager already has a resource editing form and it can be customized). In the front end of the site, you’re by definition not in the Manager, so Manager login is irrelevant.

        OTOH, If you set the permissions properly (as I described above), only users who are logged in in the front end (using the Login snippet) and who have the right to edit the current document will see the button.

        When you are previewing from the Manager as the admin Super User, you have special rights and will always see the button, but other users will not.

        If you set &debug=`1`, the button will always show and you will see a message on the button telling you whether it will be shown or not to the current user. If you set &debug=`0`, the button will be hidden from those without the necessary permissions.
          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
          • 21800
          • 174 Posts
          A very usefull snippet, great you share it!

          But I can’t get a tv like tags to show up.
          [[!NewsPublisher? &aliastitle=`1` &cancelid=`66` &initrte=`1` &rtcontent=`1` &template=`mblog` &show=`tags` ]] results in:
          Sorry . . . There were one or more problems in producing the form:
          You want to display a TV that is not attached to this template. Template: ---- TV: tags
          Although the tvs are attached to the template(s).

          Any hint is appreciated.
            • 3749
            • 24,544 Posts
            Is ’tags’ the actual name of the TV (not ’Tags’)?

            Be sure the TV is connected to the template you’ve specified (or to the system default template).

            Another thing to try is using the id of the TV rather than its name.
              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
              • 21800
              • 174 Posts
              Thank you for taking your time BobRay,

              • "tags" is the name of the tv
              • the tv is connected to the template, can be seen under the tv tab of an according page
              • using the id of the tv results in the same
              I´ve even removed "tags" from a category but nl denies accepting tvs (.. not attached to this template.)
                • 3749
                • 24,544 Posts
                Are you using the &template parameter, and is the TV also attached to that template?

                The check in NP is based on the template the new page will have (or at least that’s what it’s supposed to be checking), not the template for the NP page. If you don’t send the &template parameter, it uses the system default template, so the TV would have to be attached to that template.
                  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
                  • 21800
                  • 174 Posts

                  • I use the &template parameter and the template is attached to the TV
                  • The template of the NP page is also attached to that TV; additionally I have attached the base template too to the TV
                  It does not help; sad for a Blogpage.
                    • 3749
                    • 24,544 Posts
                    Do you have the latest version of NP (1.0.6) and MODx (2.0.8)?

                    I’m sorry, I’ve tried everything I can think of (including pasting your NP tag) and I can’t duplicate this problem. I test NP with TVs all the time.

                    You could try using the template ID rather than the name (it’s faster), but it shouldn’t make any difference.

                      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
                      • 21800
                      • 174 Posts

                      • v 1.0.6 b1, no updates available | MODx Revolution 2.0.7-pl (traditional)
                      • So did I. Seems the problem is not (only) NP
                      • I even made that pages public
                      thanx a lot