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/

This is all very confusing and the documentation in no place I have been able to find explains the layout of these files. 

If for example I define a part such as this: 

...

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

 

Where do I put the view file? Can I define it only in my own theme and not in the default theme? Can I define a default theme outside of the Dinamico directory? I feel like I should avoid mixing site-specific parts with the Dinamico directory, but I'm not sure how to do this. 

I assume that I need to put something like this in the view as well:

 

...

The template-first system of defining content assumes the location [ThemeRoot]/Default/Views/[Controller]/*.cshtml where [ThemeRoot] and [Controller] is configurable during startup.

We could add that it automatically scans /Views/[Controller]/*.cshtml, or make this configurable during configuration.

The per-theme thing is quite interesting. I pulled out of that due to complexity the last time around. I think the main question is whether the main scenario is people extending via themes without change to existing code or taking ownership of the site.