Geeks With Blogs

In Umbraco, you could consider document types like models and data types as property types for those modes. For example, you may create a document type called “Prices” to represent a page that displays a list of prices. And, then, you might create a document type called “Price Item” to represent the price list items. A property called “Price” could then represent the price of an item. When you create the Price property, you specify the data type, which in this case might be “Number”, indicating that this particular field accepts only numerical values. Consequently, you could also create a drop down list property called “Category”, allowing you to categorize the items in your price list.

imageTo add items to the drop down list, you modify the data type definition in the Developer module of the Umbraco administrative utility. Instead of modifying the drop down data type itself, you should first make a copy by right-clicking on the Data Types node and choosing Create. Give your new data type a name in the Create dialog and click the Create button.


In the Edit datatype dialog, change “Render control” to “Dropdown list”.  To add your list items, simply enter that value into the textbox next to “Add prevalue” and click Save or press the Enter key.

Now that you have a new drop down list data type created, along with assigned list items, you can use it in your document type definitions just like you would the other data types.

Posted on Thursday, December 9, 2010 12:06 AM Umbraco | Back to top

Comments on this post: Using Umbraco’s Dropdown Datatype

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © MightyZot | Powered by: