I am working on my own first test project, and I have some minor issues, I hope some of you can help with. I write this, because it can maybe be a little newbie´sh...;-)
The I try to lazyload it into a dialog with these properties:
{
label: 'Ajour Mapper',
description: 'Vælg mappe:',
view: '~/App_plugins/Solution/Editors/customTreePicker/customTreePicker.html',
multiPicker: '1',
config: {
multiPicker: "1",
entityType: "Document",
section: 'document',
treeAlias: 'documentTree',
filter: "",
minNumber: 0,
maxNumber: 5
},
}
The Html file is located at that path. These properties works if I switch the View out with 'contentPicker'.
The error in the developer console is File Not Found 404. And it gives the Url localhost.XXXXX/Umbraco/~/App_plugins/Solution/Editors/customTreePicker/customTreePicker.html.
Could you please post what the content of your package.manifest is? That will make it easier to figure out what you're currently doing and where things might go wrong :)
No idea if this will sort your problem but I notice you have a lowercase p on Appplugins instead of AppPlugins. Since the use of the tilde at the start (which should remain) indicates a serverpath umbraco might do some manipulation to make it compatible with angular which may fail with that typo... only guessing.
I may have been doing things incorrectly when loading dialogs and I don't have access to my code to check
What is your full function for loading the dialog? I don't think I used the leading tilde in this situation at all instead an absolute path i.e leading slash see an example here looks more like I remember.
I wants to load the dialog with a custom tree with data from outside Umbraco. When data is comming from outside Umbraco the normal treePicker returns an error, because it cannot load information from the entityResource.
I just want to return a nice JSON object, there can be stored.
whilst i might not know all the details of your situation, the starting point as you say will be to load your own view in the dialog which specifies your own angular contoller able to use an angular resource you've created to load data. The problem you have as I understand it is that your dialog view won't load.
Make custom contentPicker
Hi,
I am working on my own first test project, and I have some minor issues, I hope some of you can help with. I write this, because it can maybe be a little newbie´sh...;-)
I have used copied the source code from the std treepicker: https://github.com/umbraco/Umbraco-CMS/blob/release-7.1.7/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.html#L37
The I try to lazyload it into a dialog with these properties: { label: 'Ajour Mapper', description: 'Vælg mappe:', view: '~/App_plugins/Solution/Editors/customTreePicker/customTreePicker.html', multiPicker: '1', config: { multiPicker: "1", entityType: "Document", section: 'document', treeAlias: 'documentTree', filter: "", minNumber: 0, maxNumber: 5 }, }
The Html file is located at that path. These properties works if I switch the View out with 'contentPicker'.
The error in the developer console is File Not Found 404. And it gives the Url localhost.XXXXX/Umbraco/~/App_plugins/Solution/Editors/customTreePicker/customTreePicker.html.
Hope some or just one of can help...:)
Nice Weekend to you all!
Hi Kristoffer and welcome to the Umbraco developer forum :)
What does your package.manifest file look like? Does it contain the proper path to the editor view?
/Jan
Hi Jan
Thanks.:)
I have included the controller file, and it gets loaded. I do not have anything about the custom contentPicker. Should I have that?
:)
Hi Kristoffer
Could you please post what the content of your package.manifest is? That will make it easier to figure out what you're currently doing and where things might go wrong :)
/Jan
Okay, here it is the one covering my treepicker.:) Hopes it helps.
No idea if this will sort your problem but I notice you have a lowercase p on Appplugins instead of AppPlugins. Since the use of the tilde at the start (which should remain) indicates a serverpath umbraco might do some manipulation to make it compatible with angular which may fail with that typo... only guessing.
It is a good guess, but unfortunately not a solution. It still fails, when I try to lazy load the property. it gives precise this result: http://localhost:57221/umbraco/~/App_Plugins/Solution/Editors/customTreePicker/customTreePicker.html 404 (Not Found)
Forgive me for two things
What is your full function for loading the dialog? I don't think I used the leading tilde in this situation at all instead an absolute path i.e leading slash see an example here looks more like I remember.
I wants to load the dialog with a custom tree with data from outside Umbraco. When data is comming from outside Umbraco the normal treePicker returns an error, because it cannot load information from the entityResource. I just want to return a nice JSON object, there can be stored.
Does this give any sense?
whilst i might not know all the details of your situation, the starting point as you say will be to load your own view in the dialog which specifies your own angular contoller able to use an angular resource you've created to load data. The problem you have as I understand it is that your dialog view won't load.
Try changing
to
and if that does not work post the code snippet which triggers your dialog.
It was the solution. While you wrote the answer Ian, I found the solution by try and error... But you were right...:)
I think the typo you found earlier and the tilde, was the two things there together made it hard to find the solution.
Thanks for your help. Now I can concentrate on the next small but issue, maybe a post comes up tomorrow...;-)
Good to see you managed to get this solved before I visited the forums again after responding last night :)
If you're new to making your own property editors etc. then it might be handy for you to know about these resources to easier look up things etc.
https://github.com/umbraco/AngularWorkbook https://our.umbraco.org/apidocs/ui/#/api https://our.umbraco.org/documentation/Tutorials/Creating-a-Property-Editor/
Hope these can help you understand property editors better if you have not seen these links already.
Happy coding!
/Jan
is working on a reply...