I have created a custom tree to organise my content better. What i want now is to load the edit view from a node without redirecting to the content tree. I created the nodes this way:
Thanks for posting this Marthijn! Helped me out quite a bit, it's much more elegant that redirecting to the Content tree.
I wanted to clarify for anyone else looking at doing this - it's the section alias that goes in the route, so if the Custom Tree decoration looks like this:
Load node edit view in custom tree
Hi all,
I have created a custom tree to organise my content better. What i want now is to load the edit view from a node without redirecting to the content tree. I created the nodes this way:
var node = CreateTreeNode(campaign.Id.ToString(CultureInfo.InvariantCulture),
id,
queryStrings,
campaign.Name,
"icon-umb-members",
false,
String.Format("/content/content/edit/{0}", campaign.Id.ToString(CultureInfo.InvariantCulture)));
This "works" but it redirect to the content node. Is there a way that i can render the edit view in my custom tree section?
I found a solution! The first part of the String.Format is the name of your tree. So "/{custom tree name}/content/edit/{0}"
Thanks for posting this Marthijn! Helped me out quite a bit, it's much more elegant that redirecting to the Content tree.
I wanted to clarify for anyone else looking at doing this - it's the section alias that goes in the route, so if the Custom Tree decoration looks like this:
The route ends up being:
is working on a reply...