I have been delving around quite a lot with Umbraco this week,
as we are building quite a cool little site for a client which
enabled me to have a play with some bits of Umbraco I haven't
explored before. Feeling Umbraco'd up, and after being
prompted to read Tims Custom
DataType post by Niels
SkinBrowser blog post I thought I'd create my first custom
Datatype.
Well I thought I'd go super complex and create a DataType that
would take a YouTube URL and display the video… Oh yes… AND wait
for it… The DataType would allow you to have two (Yes you read that
right… two) settings to choose the height and width. [more]
I had a bit of a problem figuring out saving multiple settings,
but after I had finished
Jesper posted up an example - So I can hopefully use it in the
next one I do. Well would you believe it actually works, and
I have even packaged it up in case you don't believe me (hehehe),
and put the source code (Bottom of the page) as well so you can see
how I did it.
Just a little finishing note, anyone who is thinking about
having a go at a custom datatype - Do it, if I can create something
so can you :)




Obviously if you do want to add lots of videos I suggest you use
the much better packages here - http://our.umbraco.org/projects/tag/video#projectList
- This is a really simple example I have made
Source Code: Download
Package: Download