Create a backend button that moves the current page
Hi!
I'm working on a solution where Contour creates umbraco pages based on user input from forms. These pages are not published instantly. Instead the administrator responsible for the specific contour form (I have several different forms) gets an email telling him/her that a new page has been created. The administrator logs in to umbraco, revises the newly created page and then publishes it.
But in some cases the page that has been created should be moved to a different folder and revised and published by a different administrator. The scenario is the following:
A page is created, but not published in umbraco. This page is created from the input from a Contour form. Responsible for this form is the user Susan so the page is created in her folder (Susan's folder).
When the page is created, Susan gets an email.
Susan logs in to umbraco and sees that this page is not for her to deal with.
She pushes a button in the umbraco backend called "Pass this on to John". When she pushes this button, the page is moved to a different folder (John's folder). Pages are always moved to John's folder so Susan doesn't have to choose where the page should be moved.
As soon as the page is moved to John's folder, he gets an email telling him he has a new page to review.
John reviews the page and publishes it. It is now published in John's folder.
The part that I'm uncertain about is the button that moves the page to a different folder. Is it at all possible to create such a button - I'm thinking that there will be strange problems if you are currently editing a page and then it's moved to a totally different folder while its editing page is open? Will this move create a trigger that I can use to send the email to John?
Is there an existing plugin for this functionality or has anyone written a user control that does this? Are there any good examples that I can look at when I write my own control?
I have looked at an example for creating custom datatype (Nibble) and I have managed to convert it from being a textfield with some javascript functionality to a button. I can build my project and register the new datatype in Umbraco. I can also add it to a doctype and a button is rendered in the editor when I open a page with that doctype. But from there I need to get some sort of handler for the button - to make something happen when I click it.
Okay - now I've managed to attach an event handler to the button that is triggered when I push the button. Now I face the problem that I somehow need to get the id of the document that the control is currently on. I plan on using this id to move the document.
Create a backend button that moves the current page
Hi!
I'm working on a solution where Contour creates umbraco pages based on user input from forms. These pages are not published instantly. Instead the administrator responsible for the specific contour form (I have several different forms) gets an email telling him/her that a new page has been created. The administrator logs in to umbraco, revises the newly created page and then publishes it.
But in some cases the page that has been created should be moved to a different folder and revised and published by a different administrator. The scenario is the following:
The part that I'm uncertain about is the button that moves the page to a different folder. Is it at all possible to create such a button - I'm thinking that there will be strange problems if you are currently editing a page and then it's moved to a totally different folder while its editing page is open? Will this move create a trigger that I can use to send the email to John?
Is there an existing plugin for this functionality or has anyone written a user control that does this? Are there any good examples that I can look at when I write my own control?
Thanks in advance!
/Thomas Kahn
I have looked at an example for creating custom datatype (Nibble) and I have managed to convert it from being a textfield with some javascript functionality to a button. I can build my project and register the new datatype in Umbraco. I can also add it to a doctype and a button is rendered in the editor when I open a page with that doctype. But from there I need to get some sort of handler for the button - to make something happen when I click it.
Any pointers?
Regards,
Thomas
Okay - now I've managed to attach an event handler to the button that is triggered when I push the button. Now I face the problem that I somehow need to get the id of the document that the control is currently on. I plan on using this id to move the document.
/Thomas
is working on a reply...