I'm building a custom property editor that consist of two input boxes and a dropdown box. The input boxes are normal HTML input fields. The dropdown box is a custom Umbraco.Dropdown. My question is how to integrete the custom dropdown box to my custom property editors HTML ?
Sorry for my late reply - I'm not sure what you mean by "custom umbraco dropdown"? Is it a dropdown that you have created inside umbraco based on the dropdown datatype?
Yes it is a dropdown that I have created inside umbraco based on the dropdown datatype. Is it possible to use that dropdown in my custom property editor ?
How could I forget about that post :) It's really nice Dave! :)
But I'm wondering...will it also work when one has made a custom instance of say the umbraco.dropdown property editor with some random values in it and saved it with the name "MyCustomDrodown".
Will it then be possible to simply reference this instance of the property editor?
Custom property editor using custom datatype
Hi there.
I'm building a custom property editor that consist of two input boxes and a dropdown box. The input boxes are normal HTML input fields. The dropdown box is a custom Umbraco.Dropdown. My question is how to integrete the custom dropdown box to my custom property editors HTML ?
Best regards
Christian
Hi Christian
I assume that you're using Umbraco 7 and doing things in angularjs? Could you please share the code that you already have?
/Jan
Hi Jan.
Yup I'm using Umbraco 7 and doing my things in angularjs.
The HTML file looks something like this:
The only content of the controller is this:
And the package manifest file:
}
If I run the app only with the two textareas it works like a charm but I'm not sure how to use an umbraco.dropdown box in the above HTML file.
Hi Christian
Sorry for my late reply - I'm not sure what you mean by "custom umbraco dropdown"? Is it a dropdown that you have created inside umbraco based on the dropdown datatype?
/Jan
Hi Jan.
Yes it is a dropdown that I have created inside umbraco based on the dropdown datatype. Is it possible to use that dropdown in my custom property editor ?
Hi Christian,
In this article I describe how to reuse existing datatypes, like the Umbraco.Dropdown in your own property editors.
http://24days.in/umbraco/2014/umbraco-angular-tips/
I think this will help you.
Dave
How could I forget about that post :) It's really nice Dave! :)
But I'm wondering...will it also work when one has made a custom instance of say the umbraco.dropdown property editor with some random values in it and saved it with the name "MyCustomDrodown".
Will it then be possible to simply reference this instance of the property editor?
/Jan
Hi Jan,
That's the idea. You create a datatype in the backend. And then you can retreive that based on the name.
So you can configure datatypes (for example a nuPickers) to use in your custom components.
I also show this in the video from my umbraco uk fest talk. It's up on youtube : https://www.youtube.com/watch?v=_sX9eZSn9HI
Hi Dave Awesomesauce - Now the bricks are falling into pieces...that's a saying in english, right? :)
That's gold Dave - Can't believe it not untill now that I get it - Thanks.
/Jan
Hi Jan,
If you watch the video there are some usefull tips as well regarding to building custom sections in angular.
Dave
is working on a reply...