|Number of votes:||8|
Introducing Page Type Builder UI
This little tool has been invaluable for anybody using PageTypeBuilder on large EPiServer builds. It points out discrepancies between PageTypeBuilder page type properties and EPiServer page type definitions and allows you to edit or remove them.
For the last few weeks I have been helping Joel Abrahamsson out adding various features to the up and coming version of PageTypeBuilder.
Over the last week I have had a bit of unoccupied train commuting time so I decided to revisit the plug-in that Erik originally created and extend it a little as there were a few things I thought were missing.
Note to Erik: Sorry Erik, I’m not trying to steal your thunder here but thought the new additions described below are very useful and for the greater good of the community .
To install the plug-in you will need to download the relevant version of the PageTypeBuilderUI.dll from codeplex and add it to your EPiServer CMS 6 projects bin folder.
The version numbers of the releases are currently inline with the relevant version of PageTypeBuilder they are built against.
Current versions are:
- v1.9.1 (PageTypeBuilder v2 Preview 1)
- v1.9.2 (PageTypeBuilder v2 Preview 2)
You will also need to add the following folder to your web app /Templates/Plugins/Admin.
You may well be wondering why the project is named PageTypeBuilderUI rather than PageTypeBuilder.UI? This is because in time this project may be integrated into PageTypeBuilder v2+ so we wouldn’t want naming conflicts
Please note: The plugin is built to work with EPiServer CMS 6 R1 and upwards and PTB v1.3 and upwards.
It is advised you lock the plug-in down to WebAdmins and Administrators. To do this you can add the following to your web.config:
1: <location path="Templates/Plugins/Admin">2: <system.web>3: <authorization>4: <allow roles="WebAdmins, Administrators"/>5: <deny users="*"/>6: </authorization>7: </system.web>8: </location>
- Updating of property types
I believe Erik had previously mentioned that he would like to add this functionality assuming he got time but probably never got around to it.
If there are discrepancies between the EPiServer page definition type and the PageTypeBuilder page type property type then a checkbox will be displayed which can be checked to indicate that you would like the type to be updated. When the ‘Update Property Types’ button is clicked the page definitions will be updated with the PageTypeBuilder Page Type property type. A suitable warning about potential loss of data will be displayed first.
When updating property types, if a default value has been specified that is not valid for the new type a suitable error message will be displayed and the property will not be updated. This is inline with the validation which is performed in EditPageTypeField.aspx
- Bulk removal of properties
If there are any properties to be removed you can select all relevant page definitions by either checking the ‘Remove’ check boxes individually or toggling the select all check box. Upon clicking the ‘Remove Properties’ button all selected page definitions will be deleted.
- Bulk update of property types
If there are any properties that need there property types updating you can select all the relevant page definitions by either checking the ‘Update Type’ check boxes individually or toggling the select all check box. Upon clicking the ‘Update Property Types’ button all selected page definitions will have there types updated.
- If ‘Show only miss-matches is checked then only page types with mismatches will be shown
Below is a screen dump of the admin plug-in:
Globalizing the plug-in
The text displayed by the plug-in is taken from an embedded resource of the PageTypeBuilderUI.dll assembly. If you would like to globalize the plug-in you can add the language settings found here into the relevant language file within your EPiServer site.
When PageTypeBuilder v2.0 is officially released I will release PageTypeBuilderUI v2.0.
Please feel free to email or twitter me with any feedback @croweman
Please login to comment.