Is there an introduction to Data Types somewhere? Options
Rdunzl
Posted: Sunday, June 08, 2008 3:33:33 AM

Rank: Newbie

Joined: 3/22/2008
Posts: 15
Location: Denmark
I'm trying to get an overview of the 3.x built in data types, and I haven't found any good articles giving an overview of these, so I wonder if such an article exists and where I can find it if it does.

I like to know how I configure types like the Radiobox and whether the label is just a label for showing in the content tree, and basically I'd just like to get a brief intro to all of the data types :-)

I hope someone can help me out in this matter, thank you.
Simm
Posted: Sunday, June 08, 2008 10:26:30 PM

Rank: Fanatic

Joined: 7/22/2006
Posts: 255
Location: Randers, Denmark
Unfortunately no docs on this topic exist yet (like most coders, our fellow Umbracians are scared of writing documentation ;)). There are several ways to build a custom datatype:

The latest and by far the easiest way is to use the UserControlWrapper, which is - like the name says - a datatype which wraps around your custom datatype. Check out the source code here: http://codegarden.umbraco.org/ftpUploadDataType.zip which should give you a pointer in the right direction. Pay special attention to the umbracoValue-property .. this saves your content back to the database.

The second - and most elegant solution is the old fashioned way to build a datatype. It is a bit harder, as you need to learn more about the infrastructure of Umbraco, but it is my personal favorite. I learnt to use it via this old yet useful piece of code from Christian Palm: http://www.cpalm.dk/media/1764/multiplemediapickerviasource_source_01.zip. The source code is pretty straightforward. Here you should pay special attention to the Save()-method, anything stored in the _data-variable is stored in the database. Take a look at it with a debugger, and I'm pretty sure it will be easier to grasp.

Best Regards
Simon

Simm.dk - My base on the web - proud Umbracian since 2.0 Beta
Dirk
Posted: Sunday, June 08, 2008 10:29:24 PM

Rank: Addict

Joined: 9/27/2007
Posts: 977
Location: Belgium
And here's another resource from Tim Geyssens.

Good luck.
Regards,
/Dirk


level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.