I would like to create a function where the webadministrator (when creating content on a site) can choose "image" og "text" in a radiobutton list. If "image" is selected a mediaselector shows up, if "textstring" is selected a textstring shows up.... How can i do that?
Your best bet would probably be a custom data type (through your own user control). Short of that, you may also consider creating different containers in your tree that allows for separate document types (which in turn contain the data types of media picker or textstring respectively).
In what context are you trying to provide this functionality? Please provide further details.
Ok, in that case you'll need to have your custom data type in the form of a .Net user control. For your purposes, leveraging the user control wrapper will be ideal. Check out this article by Nibble on the topic.
In your case, you're going to want to set that 'umbracoValue' to either the media chooser node ID or the text string depending on the selected radio button. This should get you started.
If you have additional questions as you go, feel free to post away :)
content radiobutton select
I would like to create a function where the webadministrator (when creating content on a site) can choose "image" og "text" in a radiobutton list.
If "image" is selected a mediaselector shows up, if "textstring" is selected a textstring shows up....
How can i do that?
Your best bet would probably be a custom data type (through your own user control). Short of that, you may also consider creating different containers in your tree that allows for separate document types (which in turn contain the data types of media picker or textstring respectively).
In what context are you trying to provide this functionality? Please provide further details.
Thanks,
Nik
its on a document type with:
1/ headline:textstring
2/ content:editor
3/ here my chooser will show
Ok, in that case you'll need to have your custom data type in the form of a .Net user control. For your purposes, leveraging the user control wrapper will be ideal. Check out this article by Nibble on the topic.
http://www.nibble.be/?p=24
In your case, you're going to want to set that 'umbracoValue' to either the media chooser node ID or the text string depending on the selected radio button. This should get you started.
If you have additional questions as you go, feel free to post away :)
-- Nik
is working on a reply...