|Number of votes:||2|
I know what you are all thinking, v1.0 was only released 2 days ago. It must be full of bugs and this is a hasty patch release, but this is not the case, I promise .
I didn’t really see the functionality changing much and I certainly didn’t envisage a new release after 2 days but I had a brain wave yesterday and there was a new feature I wanted to slip in.
For those of you who have not read about my new page picking properties please see my previous post.
I am using the new page picking controls for a project I am currently working on.
The project is made up of one code base and many PageType’s but these will be shared amongst many different site instance’s as the site will be released globally.
In all of the sites I have worked on I normally have a Settings page which allows me to set up global site properties such as Site search page link, Site map page link etc etc.
In this particular project each site will have it’s own settings page having values that obviously differ from site to site.
I would like to be able to set the starting point of the tree for a particular property within a particular page type to point to one of the PageReference properties configured in the settings page but the current implementation of the FilteredPageReference properties does not allow this.
I have added a new delegate and a public property to the FilteredPageReference.PropertyFilteredPageReferenceSettings class as follows:
I can then set the delegate in code which will allow me to programmatically set the page picking root in code.
If the delegate method returns null or an empty PageReference then the Tree picking settings will be used. An example of programmatically setting the picking root is below:
The example above is pretty useless but demonstrates the purpose.
The PropertyInformation class which is passed as a parameter to the delegate currently has the following properties:
You could then conditionally check properties like the PageTypeId and PropertyName and then set the picking the start the a specific page.
This may or may not be useful to anyone, but I think it’s cool
Please feel free to email or twitter me with any feedback @croweman