Header Position
Position of the header (logo, search, navigation) on desktop layouts.Valid values:
'left'- Vertical header on the left side (default, recommended)'right'- Vertical header on the right side (useful for RTL languages)'top'- Horizontal header at the top'bottom'- Horizontal header at the bottom (experimental)
The header position is automatically adjusted for mobile devices regardless of this setting. This only affects desktop layouts (typically ≥1000px width).
For right-to-left (RTL) wikis, consider using
'right' to maintain a natural reading flow.Collapsible Sections
Enable collapsible sections on content pages.When enabled, page sections (defined by headings) can be collapsed and expanded by clicking on the heading. This improves readability for long articles.Example:Requirements:
- Only applies to content pages (
$title->isContentPage()) - Only works with wikitext content (
CONTENT_MODEL_WIKITEXT) - Does not apply to the main page
If MobileFrontend is installed and the page is in mobile view, MobileFrontend handles section collapsing instead.
Table of Contents
The minimum number of headings required to automatically collapse all sections in the sticky table of contents.When a page has more headings than this threshold, the table of contents starts in a collapsed state to avoid overwhelming the interface.Example:
This setting only affects the initial state. Users can still expand all sections manually.
Overflow Handling
Citizen automatically wraps overflowing content (like wide tables and code blocks) to prevent horizontal scrolling. You can customize this behavior with CSS class controls.Inherited Classes
CSS classes that should be inherited by the overflow wrapper element.When Citizen wraps overflowing content, it can preserve certain CSS classes from the original element to maintain styling.Example:
This is useful for maintaining alignment and positioning of wrapped elements.
No-Wrap Classes
CSS classes that prevent the overflow wrapper from being applied.Some tables and interactive elements (like DataTables) handle their own scrolling and shouldn’t be wrapped by Citizen’s overflow handler.Example:
Complete Example
Responsive Behavior
Citizen automatically adapts the layout based on screen size:Mobile (under 1000px)
- Header becomes a horizontal bar at the top
- Navigation drawer slides in from the side
- Search expands to full-screen overlay
- Table of contents moves to a bottom sheet
Tablet (1000px-1280px)
- Compact sidebar layout
- Sticky table of contents
- Responsive navigation
Desktop (over 1280px)
- Full featured layout
- Persistent navigation
- Side-by-side table of contents
- Sticky header (based on
$wgCitizenHeaderPosition)
Layout Hooks
Citizen provides several hooks for customizing layout behavior:CSS Customization
You can further customize the layout using custom CSS inMediaWiki:Citizen.css:
Troubleshooting
Header Not Showing
Check that the header position value is valid:Sections Not Collapsing
Verify the page meets all requirements:- Is a content page
- Uses wikitext content model
- Is not the main page
$wgCitizenEnableCollapsibleSectionsistrue
Table Overflow Issues
Add the table’s CSS class to the no-wrap list:citizen-table-nowrap class to your table: