I am creating a user control to select multiple images an then store their id's (along with other textual data) in an xml block. I have included a media picker in my control using:
You could add a media picker and textbox in the datatypes section and then add as many (or set a limit) images and text as you want in the content section. They will be saved as xml which you can then display on your website using xslt.
It's really easy to use and if you need any help just let me know!
media picker - get reference to selected item.
I am creating a user control to select multiple images an then store their id's (along with other textual data) in an xml block. I have included a media picker in my control using:
private umbraco.editorControls.mediaChooser _mediapicker;
umbraco.cms.businesslogic.datatype.DataTypeDefinition dataTypeDefinition1 = umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetDataTypeDefinition(1035);
umbraco.editorControls.mediaChooser _mediapicker = (umbraco.editorControls.mediaChooser)dataTypeDefinition1.DataType.DataEditor; myPanel.Controls.Add(_mediapicker);
This works fine and displays the selected item's name in the control.
How do I get a client side reference to the returned item so that I can use javascript to add it to my listbox?
Hi Andy,
Have a look at MultiType DataType
You could add a media picker and textbox in the datatypes section and then add as many (or set a limit) images and text as you want in the content section. They will be saved as xml which you can then display on your website using xslt.
It's really easy to use and if you need any help just let me know!
Thanks
Ben
Selected item will be stored as the id of the media item on the save event of the datatype...
Why not use the ultimate picker or multinode picker?
If you want to select multiple images you can also use the Digibiz Advanced Media Picker for this.
Jeroen
Thanks very much for the advice, I'll try out what you all suggest and see which solution best suits my requirements.
Hopefully I won't need to reinvent the wheel
is working on a reply...