Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

readme.md

Outline

Create custom designer for dynamic content widget

All Sitefinity and Feather widgets have designers where you configure widget properties. This tutorial demonstrates how to create custom designer views for dynamic content MVC widgets. For more information on creating custom designer view for content controls, see Feather: Create custom designer views.

This sample requires you to create a dynamic type Countries to work. It has to have a value for Content type (singular) set to Country, with two properties of type short text - Title and Continent. You can use the structure and the items for the Countries module by using the Countries.zip file for the structure and the Default_Countries_items.xlsx for the items.

Create the template file

To create a custom view for your widget designer, you need to create a new template file. The file name of this template must have the following naming convention:

~/Mvc/Views/<DynamicContentTypeName>/DesignerView.<ViewName>.<extension>

As <DynamicContentTypeName> you must enter the name of your dynamic content type.

NOTE: If you have created a dynamic type with name Countries, the folder name must be named with singular form - Country instead of Countries.

<ViewName> is the name of your custom designer view. For example, MyView

The extension of the template file depends on your view engine – for Razor the valid extension is .cshtml, for WebForms the extension is .aspx.

The following image illustrates the folder structure of a custom designer view for a dynamic content type with name Country:

img

To run this sample, get the DesignerView.MyView.cshtml file from this SitefinityWebApp/MVC/Views/Country folder in this repository and place it in the MVC\Views\Country folder of your Sitefinity web application.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.