Questions about sections

Are there some more detailed information about sections and how they work? In the accelerator, The PageType “Sections” Is a special page type (Framework instead of pages)? Is it possible to extend this functionality to a new page type?

Litium version: 6.2

I don’t think we have any documentation up for how sections is working. But I will try to explain here instead in a short version.

Each section is a action on an controller. The SectionControllerBase in the accelerator is only there so we ensure that we have an Index method that will have the parameter for the correct page-type. The base class is decorated with the ChildActionOrAdministrationOnly attribute that will make it possible to use the page-url to browse the page directly (as public visitor).

When the page (the one that is matching the url) is executed all the pages related (child) pages that is of the sections page-types (see Litium.Accelerator.Extensions.PageTypeExtension where the page types are hardcoded).

When the page is executed the view code is executing each section as a child controller and render that controllers view into the page.

The SectionSlideshow is little special and will have child-pages below for the different slides. All the rendering code is flatten out into the view for the SectionSlideshow so if you want another type that can be a slide in the slideshow you need to modify the \Views\SectionSlideshow\_item.cshtml so that knows what the html should be for the new slideshow item type.

1 Like