Content - Types, Elements and Controls

The editable sections in a page allow an editor to write and format text content. In addition to this, they can also add content components. Common examples are images, news lists and form input fields, but you as a developer can create any component you like.

Most web solutions include at least a few custom content components for the functions that are unique to the site or application.

A content component has three parts - a type, an element and a control:

Content type

The first object class we need for our component is Dynamix.Content5.ContentType. This is used to define:

  • Information for the editor - Name, icon, etc.

  • What kind of object that is used to store the information for an instance of the component.

Content element

The second class is Dynamix.Content5.ContentElement. This is the object that stores settings for the element. Dynamix automatically generates a dialog for editing the settings and connects it to the content editor. Content elements are regular Dynamix objects so they can be customized using descriptors.

Content control

The last part of the content component is a web control which defines the actual layout and presentation of the component - it has access to the settings from the element.

Creating content

Content types can be added to your project using the Visual Studio Template Dynamix 6 - Content Element

 

Last updated 2016-01-14