I'm after a data type that will allow me to pick a single node from the content tree, and specify the text for the link and the title for the link. I can't see to find a single package that will do this. I could just add anothter propety to my document type but that's a bit messy.
So I thought about creating a new data type, but I would appreciate some guidance on my execution plan if anyone can offer anythig.
Create a new DataType using the AbstractDataEditor
Implement some JS to open a modal window with the content tree (Do I need to create a custom service that returns the nodes? I'm not sure how the tree in the modal window is created...do I create a WebForm to handle the request? Is there a built-in service I can call?
Serialise the values stored.
Output them
The bit I'm confused about is both opening the modal window (looks like I can just grab some code that is currently used by the umbraco Content Picker) and then how the content of the modal window is generated.
How do you intend to use the datatype? I'm thinking that you should be able to use the ucomponents url picker datatype? I know it only let's you specify the title of the link, but then you should be able to simply have a text-field for the link defined on the documentype, right after the url picker?
However you could perhaps suggest this change to the ucomponents team rather than reinventing the wheel? I think it's better to collaborate and contribute to the benefit of all :) You can read more about how to contribute to uComponents here http://ucomponents.org/contribution/
Creating a new data type
Hi all,
I'm after a data type that will allow me to pick a single node from the content tree, and specify the text for the link and the title for the link. I can't see to find a single package that will do this. I could just add anothter propety to my document type but that's a bit messy.
So I thought about creating a new data type, but I would appreciate some guidance on my execution plan if anyone can offer anythig.
Hi Higgsy
How do you intend to use the datatype? I'm thinking that you should be able to use the ucomponents url picker datatype? I know it only let's you specify the title of the link, but then you should be able to simply have a text-field for the link defined on the documentype, right after the url picker?
However you could perhaps suggest this change to the ucomponents team rather than reinventing the wheel? I think it's better to collaborate and contribute to the benefit of all :) You can read more about how to contribute to uComponents here http://ucomponents.org/contribution/
/Jan
Oh, and if you want to develop your own datatype I don't know if you have had a look at the documentation hee http://our.umbraco.org/documentation/Extending-Umbraco/Property-Editors/PropertyEditorValueConverters ?
/Jan
is working on a reply...