We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49659
    • 86 Posts
    Hi,

    I've installed Notify. The Notify form launches nicely from a resource using this button in the TV:

    <button id="nf-b" onClick="nf()"> Launch Notify </button>


    The launched form uses the default property set (as expected), but I would like to have it launch with a custom property set. I added a custom property set to the Notify snippet, but unfortunately named it something other than 'NotifyProperties' as recommended in the documentation.

    The documentation refers to customizing the snippet call for a custom property set, as follows:

    [[!Notify@CustomPropertySetName]]


    ...but I can't see where that snippet call is. It's probably staring me in the face, but I can't see how to invoke the custom property set when launching Notify via the TV 'Launch Notify' button.

    I'd appreciate any help.

    Karl

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

      • 3749
      • 24,544 Posts
      The tag is in the content field of the Notify Resource.
        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
        • 49659
        • 86 Posts
        Hi Bob,

        I didn't have a snippet call in the content field, but the 'Launch Notify' button still launched the Notify form with 'default' properties values from the Notify snippet.

        To recap what I did: After installing Notify, I created a Resource document, named it 'NotifyLaunch' and connected it to the 'NotifyTemplate'. When opening the 'NotifyLaunch' document, the 'LaunchNotify' button appears down in the TV section.

        I just now added this snippet call to the content field, where 'SoCoNotifyProperties' is the name of the custom property set:

        [[!Notify@SoCoNotifyProperties]]


        ...and there is no change to the Notify form defaults. The Notify form values continue to be the 'default' properties values of the Notify snippet. I also cleared the cache, to no avail.

        Karl

          • 3749
          • 24,544 Posts
          I didn't have a snippet call in the content field, but the 'Launch Notify' button still launched the Notify form

          Unless I'm losing my mind, that's literally impossible. Without the snippet tag, you'd never see the Notify form (unless the tag is in the page's Template, which it shouldn't be).

          Here's what I think has happened. Notify, when it was installed, created its own notify page with the snippet tag and the alias of 'notify' and has been using that page all along. Your Launch Notify page has never been used, which is why changes to it have no effect.

          If I'm wrong, it could be sign of the impending apocalypse ... or senility. wink
            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
            • 49659
            • 86 Posts
            I'd tend to agree with the impending apocalypse theory, especially after tonight's Republican debates. But I digress...

            I took the following steps to test this further:

            1. removed the snippet call from the contents field of the 'NotifyLaunch' document, saved and closed it;
            2. changed the 'groups' value in the default properties of the Notify snippet;
            3. cleared the cache;
            4. opened the 'NotifyLaunch' document and clicked on the 'Launch Notify' button;

            The Notify form opens, and the changed default value for 'groups' appears.

            There are two other documents that were created when I installed Notify:

            1. NotifyPreview
            2. NotifyStatus

            The 'NotifyStatus' document has the [[!$NfStatus]] snippet in the content field. The 'NotifyPreview' document has the preview HTML in the content field.

            Neither document has the [[!Notify...]] snippet, nor does the 'NotifyTemplate'.

            Like I said, I think it's the apocalypse. ;-)
              • 3749
              • 24,544 Posts
              Your results are consistent with my theory, so the horsemen may yet be avoided. wink

              What's the alias of the NotifyLaunch document?

              Notify definitely creates a third resource during install. Its pagetitle is Notify and its alias is notify.
                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
                • 49659
                • 86 Posts
                The NotifyLaunch document alias is 'launchnotify'.

                I don't remember if I created the NotifyLaunch document from scratch, or just renamed an existing 'Notify' document. I don't remember doing that, but I could have.
                • discuss.answer
                  • 3749
                  • 24,544 Posts
                  I'll bet that you have another document somewhere with the alias of 'notify'. It may not show in the tree for some reason, but it definitely exists and has the notify tag in its content.

                  The 'notify' alias is hard-coded into the notify code. It only looks for that resource, and clearly it's finding it (or notify wouldn't run at all) even if you aren't. wink

                  That's the resource your seeing when you see the Notify form.
                    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
                    • 49659
                    • 86 Posts
                    OK, now I see the 'Notify' document with a 'notify' alias, AND this snippet:

                    [[!Notify@NotifyProperties]]


                    It was the parent document in the resource tree, and I was only looking at the child docs!

                    I was able to invoke the custom properties from that parent 'Notify' document, so I'll just delete the child 'NotifyLaunch' document, as it's not needed.

                    This qualifies as a dumb mistake on my part. So sorry.

                    Karl
                      • 3749
                      • 24,544 Posts
                      Easy to do. You created the "other" notify page and thought is was in use when it wasn't. wink

                      I've done *way* stupider stuff than that. wink
                        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