I've got my own custom event that fires on Document_AfterPublish. It basically checks that a property is ticked and if it is it copies the page over to a different section of the site.
I can get all that working but I want to be able to show the user a success/fail message in the speech bubble but for the life of me I can't do that. I only ever see the standard "Content published and visiible at your website" message. I have noticed when I've tried to show the speech bubble the standard message pops up a number of times.
Things I've tried so far picking things up from other posts:
But can't seem to get any of them working. The last solution, I've even tried just adding a JavaScript alert('hello') and can't get that to work so maybe I'm missing something??
It doesn't work if you click the "Save & Publish" icon within the page. I was under the impression both should call the "AfterPublish" event? Is this not the case?
For anybody who is interested I managed to ger around this problem (although not a true fix).
Initially I had my code being called on Document_AfterPublish if the user had checked a checkbox.
The solution I finally got to was to not have my code get called on the Document_AfterPublish event but to use a customer datatype and call my method from in there. My code and all logic that calls the ShowSpeechBubble still sits outside of my Umbraco site and the custom data type (its compiled in another project).
I've changed the checkbox to a button and my logic gets called on click of that button.
ShowSpeechBubble Document_AfterPublish
Hi
I've got my own custom event that fires on Document_AfterPublish. It basically checks that a property is ticked and if it is it copies the page over to a different section of the site.
I can get all that working but I want to be able to show the user a success/fail message in the speech bubble but for the life of me I can't do that. I only ever see the standard "Content published and visiible at your website" message. I have noticed when I've tried to show the speech bubble the standard message pops up a number of times.
Things I've tried so far picking things up from other posts:
But can't seem to get any of them working. The last solution, I've even tried just adding a JavaScript alert('hello') and can't get that to work so maybe I'm missing something??
Any help appreciated
Thanks
Ben
Update to this, this works but only if you right click and publish
It doesn't work if you click the "Save & Publish" icon within the page. I was under the impression both should call the "AfterPublish" event? Is this not the case?
For anybody who is interested I managed to ger around this problem (although not a true fix).
Initially I had my code being called on Document_AfterPublish if the user had checked a checkbox.
The solution I finally got to was to not have my code get called on the Document_AfterPublish event but to use a customer datatype and call my method from in there. My code and all logic that calls the ShowSpeechBubble still sits outside of my Umbraco site and the custom data type (its compiled in another project).
I've changed the checkbox to a button and my logic gets called on click of that button.
Got there in the end ;)
is working on a reply...