Repository navigation
Module: Informer
The Informer module displays a dismissible notification bar at the top of the page with a spinning indicator. Useful for maintenance notices, announcements, or alerts.
- Notification bar above page content with spinning indicator
- Dismissible — visitors can close the bar; preference stored in a cookie
- Auto-reset — saving settings resets all dismissals so everyone sees the updated bar
- HTML support — notification text supports sanitized HTML for links, bold, and other formatting
- Customizable colors — background and text colors via admin panel
-
Translated admin UI — admin labels are translated (
en,ru); the bar text itself is shown as entered -
Demo mode — automatically enabled with admin access info when
OCMS_DEMO_MODE=true
Navigate to Admin > Modules > Informer to configure:
| Setting | Description | Default |
|---|---|---|
| Enabled | Show/hide the notification bar | Off |
| Notification Text | The message (HTML allowed) | Empty |
| Background Color | Bar background color |
#1e40af (blue) |
| Text Color | Text and icon color |
#ffffff (white) |
The admin page includes a live preview that updates as you change settings.
Check our <a href="/sale">sale page</a> for <strong>50% off</strong>!The text is sanitized before rendering (the same bluemonday UGC policy as page HTML): scripts, event-handler attributes and inline style attributes are removed. Use the color settings for styling.
The text is rendered as-is for every language; it is not looked up in locale files.
When a visitor clicks the close button:
- The bar is hidden immediately
- A cookie (
ocms_informer_dismissed) is set with the current settings version and a 365-day expiration - On subsequent visits, the bar stays hidden as long as the cookie version matches
When an admin saves settings, an internal version counter increments, invalidating all existing dismissal cookies so the bar reappears for all visitors.
The informer bar is injected via the informerBar template function in the theme's base layout, passing the CSP nonce:
<body>
{{informerBar .CSPNonce}}
...
</body>Both core themes include this integration. Custom themes should add the same line after <body>. See Theme System for details.
| Property | Value |
|---|---|
| Module name | informer |
| Database table | informer_settings |
| Cookie name | ocms_informer_dismissed |
| Admin URL | /admin/informer |
| Public route |
GET /api/informer/demo-credentials (demo mode only; serves the demo password to the banner) |
| Template function | informerBar |
Getting Started
Core Features
- Content Management
- Media Library
- Taxonomy
- Menu Builder
- Forms
- Multi-Language
- SEO
- Feeds
- Video Embedding
- Agent-Ready
Administration
API & Integrations
Security
Theme Development
Module Development
Built-in Modules
- Module: Sentinel
- Module: Developer
- Module: DB Manager
- Module: Migrator
- Module: Informer
- Module: Demo Mode
- Module: Internal Analytics
- Module: External Analytics
- Module: Privacy
- Module: Embed
- Module: MCP Server
Deployment