SectionContainerRenderer
Custom HTML renderer for CustomContainer that turns the ::: containers into the page sections product pages are built from: alignment: :::center, :::left, :::right — the ss-md-align--{side} class, styled by the site;:::feature-left / :::feature-right — a two-column media+text section (add the "alt" argument for a tinted full-width band);:::cards — a responsive card grid, one card per ### heading;:::stats — a row of big numbers, one per "value | label" line;:::cta — the links rendered as buttons, the first one primary;:::steps — a numbered walkthrough, one step per ### heading;:::quote — a testimonial whose trailing em-dash line becomes the attribution;:::spoiler Title — a collapsed <details> block with the title as its summary. A host adds its own sections with ISectionBlock); anything else falls back to a plain <div> classed with the container name.
Наследует: HtmlObjectRenderer<CustomContainer>
Методы
public void Register(ISectionBlock block)
sectionContainerRenderer.Register(block)
Adds a host-defined section, rendered for every ::: container whose info equals its name. A block registered under a name already taken by another host block replaces it.
- block
- The section to add.
protected override void Write(HtmlRenderer renderer, CustomContainer obj)
sectionContainerRenderer.Write(renderer, obj)
Writes the whole section, including its outer element and children.
- renderer
- The HTML renderer.
- block
- The container being rendered.