Regarding your first question:
The reason this is happening lays in the fact that EventsView control existed before we've implemented and we needed to provide some kind of backward compatibility. Namely, before the new ContentView designers we had only one mode for each control and the template names were usually: ContentViewItemList.ascx and ContentViewSingleItem.ascx. With the new ContentView designers we have introduced modes and the templates are now in the Modes folder (e.g. ~/Sitefinity/ControlTemplates/Events). So when we introduced the new ContentViewDesigner we didn't want to break all the existing controls, therefore before you open the EventsView control for the first time it is using the old templates. If you wish the initial template to be used instead of the one that appears after you make a change to settings, please do following:
- Open this file:
- Modify the listPageMode PresentationMode in following manner:
These two lines:
change into these two lines:
By doing so, you will effectively change the master/detail templates that this particular PresentationMode uses.
To your second question:
The new ContentView designers are extensible and configurable without doing any coding. The reason you are seeing more configurable options on the demo TUI site is because the UX team that works on the demo site decided to add more options. This is very simple to do and I will briefly explain how can you do that in your project as well.
Open this file:
This is a file that controls the designer of the EventsView control. You have already opened it earlier to change the templates a presentation mode uses. Now, this time we will add one more setting for the master mode.
Please find the following tag on the page:
|<sfDesign:PresentationModeSettings ID="ModesSettings1" runat="server">
and then locate the collection of MasterSettings controls. You will see there are several settings there, some of them are called TextSettings some ContentSettings. Those are the two built in settings in Sitefinity. You can add new settings to this collection, by simply following the pattern. Let's assume you have a RegistrationPrice meta field and you want to add the setting in the designer for this meta field. Here is what you would add to the MasterSettings collection:
| SettingTitle="Registration Prive"
I'll walk you briefly through the settings we have set:
- ID - id of the setting. It is not important to what you set it as long as it is unique
- TargetID - id of the control in the MasterTemplate that this setting is controlling
- SettingTitle - title of the setting that users will see in the ContentViewDesigner
- AllowLabelSetting - will users be able to set the label for this RegistrationPrice control (e.g "Price")
- AllowVisibilitySetting - will users be able to hide and show RegistrationPrice control
- TargetVisibleByDefault - will RegistrationPrice control be visible by default or not
I hope you will find this information helpful. Let us know if there is anything else we can do for you.
the Telerik team
Check out Telerik Trainer
, the state of the art learning tool for Telerik products.