Web part modifications

Top  Previous  Next

Web part cloning

 

If you need to copy or modify the behavior of some web part, you can clone the web part. It ensures that your changes won't be overwritten with the nearest upgrade.

 

You can clone a web part in Site Manager -> Development -> Web parts. Choose the original web part and click Clone web part. Then, you can modify the web part code in Visual Studio.

 

 

Web part layout

 

Custom web part layouts allow you to modify the design of web parts. It's useful if you need to change the look of some dialog or hide some field.

 

Go to CMS Desk, choose the Design mode, open web part properties and switch to the Layout tab. Here you can choose to create a new layout and modify its HTML code. Please note: you always need to keep all ASP.NET controls in the layout. If you need to hide some of the controls, just add the Visible="False" attribute to the control.

 

 

Web part inheritance

 

Web part inheritance allows you to create web parts with pre-set values for particular purpose. You can, for example, create a specialized web part for displaying news, inherited from the Repeater web part. You will define default values for the relevant properties so that the Repeater web part displays news items without additional configuration. It may speed-up your work.

 

You can create an inherited web part by going to Site Manager -> Development -> Web parts, clicking New web part and choosing to inherit from an existing web part.