Renderers overview
Log in to add to favouritesRenderers are a powerful feature that determine which Block should be used to display specific content. They create connections between content types or URLs and the appropriate display components, giving you flexibility in how your site renders different types of content.
How renderers work
A renderer creates a relationship between content (identified by URL or content type) and a specific Block. When a browser requests content, the renderer determines which Block should handle the presentation.
This approach provides several benefits:
- Use different languages or frameworks across your site
- Apply specialised rendering for specific content types
- Create consistent presentation for similar content
- Implement rendering logic at different levels of your Site View structure
Example: Blog post rendering
When a visitor accesses a blog post:
- The system identifies the content as a "blog" content type
- The renderer maps this content type to a "blog-post" Block
- The "blog-post" Block renders the content with appropriate styling and layout
Setting up renderers
Renderers can be created in two ways:
- Automatic creation: When you push a new Block to a Contensis project
- Manual creation: Through the Renderer editor in Project settings
Creating renderers manually
To set up a renderer manually:
- Navigate to Project settings
- Select Renderers from the menu
- Press New renderer
- Select the Block to be used
- Save your renderer configuration