Beyond the standard content types like Text, Image and Flash Editors can add Structure Elements to content placeholders. Structure elements can contain a visual representation (a HTML snippet) and/or behaviour (code behind written in a .NET language). Developers create structure elements and enable them for certain placeholders. Editors can add the elements to pages as needed.
There are the following three types of structure elements:
Structural elements are just pieces of HTML, optionally containing placholders. They can be used to create reusable pieces of layout. Developers decide which elements are available for which placeholder. Structural elements can be created as plain HTML files.
With dynamic elements you can allow content editors to add ASP.NET controls to to their pages. You can develop the controls yourself or use existing third-party controls. They can be either of type "user-defined control" (i.e. an .ASCX file with code-behind in some DLL) or of type "custom control" (i.e. compiled in a DLL). If an Editor places a dynamic control on a page and publishes it, this control will be executed (rendered) in the Live System on every requests (=dynamic). It is possible to define parameters for the element and let the Editors change them.
In older versions of AxCMS.net there were also so called dynamic controls. Since version 9.0 they are obsolete and should be converted to dynamic elements.
Static elements can be viewed as a merge between structural elements and dynamic elements. On the one hand they can contain placeholders; on the other hand they are ASP.NET controls and will be executed (rendered). Static elements can have parameters. The major difference between static and dynamic elements is the execution time. Dynamic elements are executed in Live System on every request. Static elements are executed once during publishing and exist in Live System as static HTML. As static elements can contain placeholders, the content of these placeholders can be accessed from the element's code, but only in Management System.
Possible use cases for static elements are:
- performance improvement of the Live System (they are rendered only once during publishing, not every time a page is requested)
- Programmatic access and modification of other content entered by editors (think about an element used to enable Editors to enter code snippets to showcase on their Website. The static element could act as a "syntax colorizer element" which would automatically syntactically colorize the source code entered into its placeholder)
- Possibility to have placeholders in controls used by several page templates (such as navigation control, header, footer etc).
It is possible to define parameters for static elements and let content editors change them. It is possible to develop a custom parameter editor, which will be shown every time an editor is inserting or editing a static element. You'll find more information and a code example in the section Developing a Static Element.
It is possible to develop a custom parameter editor, which will be shown every time an editor is inserting or editing a static/dynamic element.
Organizing Elements in the Ribbon Toolbar