Custom filed in Navigation Widget
Please let me know if i can add a custom field in default navigation widget designer ?
I want to add field which should be populated in the Navigation widget designer.When i edit Navigation widget, designer should have extra field like CSS class, which can be mapped to my Navigation widget template.
You can create a custom field for the Pages, for example 'CustomClass'. Then you would create a custom Navigation template where you could use code-behind or even within the markup itself to bind the value of this custom field to the markup.
An example on how to do this within the code-behind:
Thanks for you reply,
I will be bale to create custom field for pages and can access the same in navigation templates,
But i want the custom field to be added in the Navigation widget or a new field with drop down values to be added in the navigation widget designer like "cssclass" and i can sort the navigation design according to the value provided by the user.
Please let me know if I can customize the default Navigation widget designer, eg. can i change the cssclass to dropdown populated with few default values.
Wouldn't the default CSS Class field available in the Navigation widget suffice for your needs?
If you really need to customize the default Navigation widget designer you will need to override some of the base classes in order to introduce your customization.
1. First you need to inhering from our default LightNavigationControl class (the Navigation widget).
2. For the designer you need to inherit from LightNavigationDesigner
3. You need to reference this custom designer from the custom navigation control from step 1 like so: