Template:ContentTemplate
Jump to navigation
Jump to search
```wikitext
Sections
<main class="cpage__main" role="main">
</main>
```
---
- CSS (add to `MediaWiki:Common.css`)
```css /* Content page modern layout */ .cpage {
display: flex; align-items: flex-start; gap: 1rem; /* space between columns */
} .cpage__left {
flex: 0 0 320px; /* fixed left column width */ min-width: 260px;
} .cpage__main {
flex: 1 1 auto; /* fluid middle column */ min-width: 0; /* allow content to shrink without overflow */
} .cpage__aside {
flex: 0 0 320px; /* optional right column */ min-width: 260px;
}
/* Responsive: stack on narrower screens */ @media (max-width: 1024px) {
.cpage {
flex-direction: column;
}
.cpage__left,
.cpage__aside {
flex: 1 1 auto;
}
}
/* Optional: quick polish hooks if SectionTemplate renders headings/content blocks */ .cpage .section {
/* If your SectionTemplate emits a .section wrapper, you can style it here */
} ```
---
- Parameters
- `welcome` — passed through to `HeaderTemplate`.
- `blurb` — passed through to `HeaderTemplate`.
- `sections_title` — left column heading (default: `Sections`).
- `sections_content` — left column content (lists, nav, links).
- `about_title` / `about_content` — optional; renders only if `about_content` is non-empty.
- `featured_title` / `featured_content` — optional; renders only if `featured_content` is non-empty.
- `news_title` / `news_content` — optional; renders only if `news_content` is non-empty.
- `image_content` — optional; renders a right-side `<aside>` only when provided.
- `show_toc` — set `yes` to show TOC; default hides it.
- `show_section_edit` — set `yes` to show section edit links; default hides them.
---
- Usage Example
```wikitext Template:ContentTemplateModern ```
---
- Notes
- The right column and any middle sections are **conditional**—they won’t render if their `*_content` param is empty.
- All widths are controllable in CSS. If you want a narrower left column, change the `.cpage__left` `flex-basis`.
- Keep headings in `SectionTemplate` semantic (`
`, `
`) for accessibility.