Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

I see there are views defined in all sorts of places, such as:

  • ~/Dinamico/Themes/Default/Views/ContentPages/XXX.cshtml
  • ~/Dinamico/Themes/Default/Views/ContentParts/XXX.cshtml

but then there are also some things in a Shared folder e.g. 

  • ~/Dinamico/Themes/Default/Views/Shared/

If for example I define a part such as this: 

Code Block
[PartDefinition()]
[RestrictChildren(typeof(foo))]
[AvailableZone("Content", "Content")]
public class CustomPart : PartModelBase
{
    ...
}

For a primer on Dinamico, first read the instructions on defining content pages using Dinamico.

The template-first system of defining content assumes the location [ThemeRoot]/Default/Views/[Controller]/*.cshtml, where [ThemeRoot] and [Controller] is configurable during startup.  . A default controller for Content Parts (called ContentPart), which show up in the drag-and-drop toolbox, is provided as part of the Dinamico package. This controller is registered by default at Dinamico startup, and parses pages under the path: [ThemeRoot]/Default/Views/ContentPart/[Name].cshtml, where [Name] is the class name of each content part.

Here is a sample Dinamico ContentPart: