March 29th, 2006
I have created a new Data Type to use in umbraco, different people on the umbraco mailing list requested this kind of Data Type.
I use this a Data Type like this on a regularly basis and with big pleasure in Sitecore CMS, therefore it was naturally for me to make this to umbraco.
Download (All files needed to use MultiplePagePickerViaSource in umbraco) 12 KB
Download source (Visual Studio 2003 project) 28 KB
In short the MultiplePagePickerViaSource is a Data Type where you can select multiple children of a given page in the site structure you can also sort the selected pages.
See the screenshot to get a better understanding
Cropped thumbnails of screenshots in random order, click in the thumbnails to see the screenshot in full size




There are many ways of using the MultiplePagePickerViaSource in umbraco, let me try to give you some examples:
1. Blog categories
You could use the MultiplePagePickerViaSource to select multiple blog categories to a page/post, just use the id of the mother to the blog categories.
2. Meta tags (Category)
You can create your meta tag categories in the site structure, just because the are in the site structure the don’t have to be browsable on the website. This way a normal editor can create categories, no need to edit prevalues etc.
I could go on and on, but please leave a comment on have you are using the MultiplePagePickerViaSource in umbraco.
Install
Download (Link is in the top of this post).
Copy the two folders to your site.
How to use
Now you should be able to setup a new Data Type to use CPalm.MultiplePagePickerViaSource in the Developer section of umbraco.
When you are using the CPalm.MultiplePagePickerViaSource Data Type in a Document Type is it important to tell the Data Type where to pickup childs (Pages).
You are doing this by using the field “Description” on the property, you should write the ID of the mother of the childs you want to get listed.
Example xslt on using it
MultiplePagePickerViaSource.xslt
Please be aware that the xslt function umbraco.library:Split is included in umbraco version 2.1.1+
Web.Config
Please be aware that you do not need to add these settings to web.config, it is optional and not required.
If you can’t place the javascript file, it the default location you can change the location via the key MultiplePagePickerViaSource_JavascriptSrc
add key=”MultiplePagePickerViaSource_JavascriptSrc” value=”/myscript/MultiplePagePickerViaSource.js”/
I have included a .net check to se if the javascript file is present, this way you don’t get strange javascript errors but a .net exception.
You can skip this check via the key MultiplePagePickerViaSource_Skip_System.IO.File.Exists_Check
add key=”MultiplePagePickerViaSource_Skip_System.IO.File.Exists_Check” value=”true”/
The check is cached for performance.
Final notes
It’s was actually quite simple to make this Data Type.
85% of the time spent on this project was used on documentation, screenshot, preparing code for download etc.
15% on actually coding (the funny part)
No wonder why documentation some times halts on open source projects
Drinking: Aldi Gold Coffee
Listening to: Rasmus Nør
Tags:
Umbraco, Umbraco Extension