Custom Section - I need a link to open the "Create" (create node) dialog
Hi,
I created a custom section to manage a specific area of the site and I'm using the UmbracoDataContext classes to list nodes of a specific type (Event) in my aspx pages of my section.
The idea was to give the customer access only to a particular area and an advanced search to find the nodes in that area and fast editing options like "publish/unpublish" with a single click, change an option of the node with a single click etc.
I also had to give the customer a simple function to create a new node in the area.
To do so, I gave the customer access to the "Content" section, with root node, the node of the special area.
As I used umbraco nodes in my custom section, I didn't want to code from scratch a page for creating a new node. I "intercepted" what URL is called when the user, from the "Content", right clicks on a node and then clicks on "Create".
So if I create a link with this URL, the page to create a new node type is opened correctly: the user is prompted to give a node name, choose a document type from a dropdown list and "Create" or "Cancel".
In the standard "Content" section of the Umbraco backend, this page is displayed in a nice dialog, the user can move it and if click on "Cancel" it disappears. In my section "cancel" doesn't do anything. I tried to open this in a fancybox, but of course the "cancel" link doesn't close the fancybox from there either...
How can I open this page in a dialog, as from the "Content" section?
Custom Section - I need a link to open the "Create" (create node) dialog
Hi,
I created a custom section to manage a specific area of the site and I'm using the UmbracoDataContext classes to list nodes of a specific type (Event) in my aspx pages of my section.
The idea was to give the customer access only to a particular area and an advanced search to find the nodes in that area and fast editing options like "publish/unpublish" with a single click, change an option of the node with a single click etc.
I also had to give the customer a simple function to create a new node in the area.
To do so, I gave the customer access to the "Content" section, with root node, the node of the special area.
As I used umbraco nodes in my custom section, I didn't want to code from scratch a page for creating a new node. I "intercepted" what URL is called when the user, from the "Content", right clicks on a node and then clicks on "Create".
With Firebug I got an url similar to this:
/umbraco/create.aspx?nodeId=2349&nodeType=content&nodeName=Events&rnd=6.1&rndo=7.2
So if I create a link with this URL, the page to create a new node type is opened correctly: the user is prompted to give a node name, choose a document type from a dropdown list and "Create" or "Cancel".
In the standard "Content" section of the Umbraco backend, this page is displayed in a nice dialog, the user can move it and if click on "Cancel" it disappears. In my section "cancel" doesn't do anything. I tried to open this in a fancybox, but of course the "cancel" link doesn't close the fancybox from there either...
How can I open this page in a dialog, as from the "Content" section?
Thx
I think I found the solution on my own:
check: umbraco_client\Application\UmbracoApplicationActions.js
search for create.aspx
check also umbraco_client\Application\UmbracoClientManager.js
I ended creating this javascript call:
UmbClientMgr.openModalWindow("create.aspx?nodeId=" + "1349" + "&nodeType=" + "content" + "&nodeName=" + "Events" + '&rnd=' + Umbraco.Utils.generateRandom(), "Create", true, 600, 425);
Hope it helps somebody else with the same need ;) cheers
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.