How do you define which Angularjs page to use as the edit page for a menu item on a custom tree in the backoffice?
It seems Umbraco always expects edit.html?
protected override MenuItemCollection GetMenuForNode( string id, FormDataCollection queryStrings )
{
var menu = new MenuItemCollection();
string lang = Security.CurrentUser.Language;
if( id == Constants.System.Root.ToInvariantString() )
{
menu.Items.Add<CreateChildEntity, ActionNull>( "" );
}
else if( id == "productcategories" )
{
menu.Items.Add<CreateChildEntity, ActionNew>( ui.Text( "actions", ActionNew.Instance.Alias ) );
}
menu.Items.Add<RefreshNode, ActionRefresh>( ui.Text( "actions", ActionRefresh.Instance.Alias ), true );
return menu;
}
If you click "new" on the productcategories menu node, I would like to use "productcategories-edit.html" as the edit page. Is that possible?
There's conventions around what to call the edit pages etc. with the back office - dashboards, edit pages, etc. are all expected to be in a particular location and have a particular name, I'm not sure whether the documentation on it all though is very clear or even updated at the moment.
For tree edit dialogs - if I have a tree controller defined like so:
[Tree("products", "productCategories", "Product Categories")]
[PluginController("Products")]
public class ProductCategoryTreeController : TreeController {
}
Then I need to create my edit form angular view here:
Tip: you could also find out where to place one of these forms for convention-based file locations/names by inspecting the network calls and looking for the 404 results when you try to create a new node etc.
Keep up n Kind that you can also override the name if the view that is called.
So if you have more then one Bode type you mostly need an editNodeA and editNodeB.
Have a look at the parameters of the createtreenode method in your tree.
Currently in mobile so can't copy example that i have.
edit page for custom section menu item
How do you define which Angularjs page to use as the edit page for a menu item on a custom tree in the backoffice? It seems Umbraco always expects edit.html?
If you click "new" on the productcategories menu node, I would like to use "productcategories-edit.html" as the edit page. Is that possible?
K.
There's conventions around what to call the edit pages etc. with the back office - dashboards, edit pages, etc. are all expected to be in a particular location and have a particular name, I'm not sure whether the documentation on it all though is very clear or even updated at the moment.
For tree edit dialogs - if I have a tree controller defined like so:
Then I need to create my edit form angular view here:
So the location is as follows:
Tip: you could also find out where to place one of these forms for convention-based file locations/names by inspecting the network calls and looking for the 404 results when you try to create a new node etc.
Thank you.
Meanwhile, I also found that the following does what I need:
So problem solved.
And yes, I really have the impression that the documentation is currently lacking a lot of needed information...
Great - glad you worked it out :)
Keep up n Kind that you can also override the name if the view that is called. So if you have more then one Bode type you mostly need an editNodeA and editNodeB.
Have a look at the parameters of the createtreenode method in your tree.
Currently in mobile so can't copy example that i have.
is working on a reply...