Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi to all, I'm realizing a package to test angular. My package create a custom section with a tree. When I click a tree item, the default edit url is:
http://www.mydomain.it/mySection/mytree/edit/treeItemId.html
I also created a views folder that contain my custom views and is located here:
App_plugin/mySection/backoffice/mytree/views/treeItemId.html
How can I associate a treeItem to my custom routePath and view?
I tried:
CreateTreeNode("cleanup", id, queryStrings, "Cleanup", "icon-delete color-red", false)
but it search the view into this folder:
App_plugin/mySection/backoffice/mytree/edit.html
I also tried:
CreateTreeNode("cleanup", id, queryStrings, "Cleanup", "icon-delete color-red", false, FormDataCollectionExtensions.GetValue<string>(queryStrings, "application") + "/" + this.TreeAlias + "/users-cleanup")
Umbraco/Views/mytree/treeItemId.html
CreateTreeNode("cleanup", id, queryStrings, "Cleanup", "icon-delete color-red", false, string.Format("mySection/backoffice/myTree/views/treeItemId"))
Umbraco/Views/backoffice/mytree.html
Can anyone help me?
Thank you in advance
Adriano
I think that Umbraco uses a predefined structure of RoutePath:
{sectionAlias}/{treeAlias}/{method}/{id}
And this path say to Umbraco to open this Angular template:
App_Plugins/{sectionAlias}/backoffice/{treeAlias}/{method}.html
If you want to open a template in other path you will use ng-template Angular directive. I have not found another solution.
ng-template
Thank you Flavio, I think I'll do it...
:-)
OK...it's official...I'm very confuse.
I'm tried (with no results) all I found on internet.
I'm tried the ng-template and also the ng-include directives, but I don't see my custom view page.
OK I'm a newbie on angular...but this is frustrating.
So...can you help me to do that?
Can you post source HTML code and output HTML code?
Risolto...ehm...SOLVED!!! :-)
I put in my edit.html file this directive
<div ng-include="" src="'/App_Plugins/ADRIANO/backoffice/test/views/' + id + '.html'"></div>
and it works perfectly!!!
I don't know if this is the best way to use my custom routhPath, but until I don't understand how to optimize it, I am satisfied. :-)
Grande Adriano! :-D
Perfect!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How can I associate a treeItem to my custom routePath and view?
Hi to all, I'm realizing a package to test angular. My package create a custom section with a tree. When I click a tree item, the default edit url is:
I also created a views folder that contain my custom views and is located here:
How can I associate a treeItem to my custom routePath and view?
I tried:
but it search the view into this folder:
I also tried:
but it search the view into this folder:
I also tried:
but it search the view into this folder:
Can anyone help me?
Thank you in advance
Adriano
I think that Umbraco uses a predefined structure of RoutePath:
{sectionAlias}/{treeAlias}/{method}/{id}
And this path say to Umbraco to open this Angular template:
App_Plugins/{sectionAlias}/backoffice/{treeAlias}/{method}.html
If you want to open a template in other path you will use
ng-template
Angular directive.I have not found another solution.
Thank you Flavio, I think I'll do it...
:-)
OK...it's official...I'm very confuse.
I'm tried (with no results) all I found on internet.
I'm tried the ng-template and also the ng-include directives, but I don't see my custom view page.
OK I'm a newbie on angular...but this is frustrating.
So...can you help me to do that?
Thank you in advance
Adriano
Can you post source HTML code and output HTML code?
Risolto...ehm...SOLVED!!! :-)
I put in my edit.html file this directive
and it works perfectly!!!
I don't know if this is the best way to use my custom routhPath, but until I don't understand how to optimize it, I am satisfied. :-)
Adriano
Grande Adriano! :-D
Perfect!
is working on a reply...