We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44433
    • 33 Posts
    This is my newspublisher call on one page

    [[!NewsPublisher? &show=`pagetitle,menutitle,alias,parent,statusTV,content`
                    &initrte=`1`
                    &initdatepicker=`1`
                    &rtcontent=`1`
                    &rtsummary=`1`
                    &parentid=`1`
                    &published=`1`
                    &template=`6`
                    &captions=`pagetitle:Page title such as 1.4 - The effects of customer care on the rest of the company,menutitle:Menu title same as above,alias:Page id for example unit 303 task 1.4 would become 30314,parent:Unit to be saved under,statusTV:What is the works status?,content:Your work`
                ]]


    Then on the pages I create I have this:

    [[!NpEditThisButton? &np_id=`[[*NpId]]`]]


    Currently going to a page I create using newspublisher, I cannot edit it because the button, although not showing an error in debug mode, does nothing.

    What am I missing and what did I do wrong?

    This question has been answered by BobRay. See the first response.

      Follow me on twitter @christofvonlee
      • 37105
      • 194 Posts
      Try adding param &debug=`1`.

      [[!NpEditThisButton? &debug=`1`]]

      This should always show the button even on error. Maybe you get some extra information with it!
        Codeplaza Webdesign: for professional websites at low cost
      • discuss.answer
        • 3749
        • 24,544 Posts
        You only need the &np_id property if you have multiple NewsPublisher pages (that is, more than one page with the NewsPublisher snippet tag in the content section).

        If you only have one page with a NewsPublisher snippet tag, leave out the &np_id property from the edit button tag and it should work, as long as you haven't renamed the NewsPublisher Resource. If you have (or if it still doesn't work), set the np_id property of the NpEditThisButton snippet (on its Properties tab) to the ID of the Resource with the NewsPublisher tag.

        If you *do* have more than one NewsPublisher page, each page you want to edit via the button must have a TV called NpId containing the ID of the NewsPublisher Resource you want the button to send them to. It can be an @INHERIT TV which will inherit the value from any ancestor that has it set.


          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
          • 44433
          • 33 Posts
          Quote from: donquicky at Jul 22, 2013, 04:18 PM
          Try adding param &debug=`1`.

          [[!NpEditThisButton? &debug=`1`]]

          This should always show the button even on error. Maybe you get some extra information with it!

          Originally using debug I got the button and it read along the line of 'could not find np_id, set it manually' which is why I used
          [[!NpEditThisButton? &np_id=`[[*NpId]]`]]


          Quote from: BobRay at Jul 22, 2013, 06:13 PM
          You only need the &np_id property if you have multiple NewsPublisher pages (that is, more than one page with the NewsPublisher snippet tag in the content section).

          If you only have one page with a NewsPublisher snippet tag, leave out the &np_id property from the edit button tag and it should work, as long as you haven't renamed the NewsPublisher Resource. If you have (or if it still doesn't work), set the np_id property of the NpEditThisButton snippet (on its Properties tab) to the ID of the Resource with the NewsPublisher tag.

          If you *do* have more than one NewsPublisher page, each page you want to edit via the button must have a TV called NpId containing the ID of the NewsPublisher Resource you want the button to send them to. It can be an @INHERIT TV which will inherit the value from any ancestor that has it set.

          BOB RAY HIMSELF! The file structure is so that all these resources are pieces of work with the edit button, and then I have a page to submit work which has the newspublisher call with id of 267.

          As I understand I need to add the id 267 (the page with the newspublisher call) to the button call on these pieces of work. I will try this later tonight, thanks.
            Follow me on twitter @christofvonlee
            • 3749
            • 24,544 Posts
            Normally, the Edit button call uses the [[*NpId]] value in the button call. That tag is replaced by the content of the NpId TV for that page, but you can certainly use the ID of the NewsPublisher page rather than the tag. In fact, that will be somewhat faster.

            Again, though, if you only have one page with a NewsPublisher tag on it (267), you can edit the NpEditThisButton snippet, and on its Properties tab, set the np_id property to 267. Then use the Edit tag with no properties and that should solve the problem for all pages.

              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
              • 44433
              • 33 Posts
              Thanks for the help,

              that would be a good solution however I am using more than one call. There are actually two, one for creating resources and one for creating the containers for different resources.

              I am having some trouble with a booltpl error and a way to alter the deleted setting of a resource but I have made a new question here:https://forums.modx.com/thread/85812/newspublisher-when-adding-039-deleted-039-into-a-form-returns-039-could-not-find-tpl-chunk-booltpl-039#dis-post-473060 , if you would be able to have a look?
                Follow me on twitter @christofvonlee