> For the complete documentation index, see [llms.txt](https://aptitude.gitbook.io/zaubercms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aptitude.gitbook.io/zaubercms/extending-zaubercms/blocklisteditor/content-block.md).

# Content Block

To make it easier to display the Block List Editor editor in the front end, we have a helper view  component

```csharp
@await Component.InvokeAsync("RenderBlocks", new { blocks = Model.ContentBlocks, cssSeparatorClasses = "py-3" })
```

Where Model.ContentBlocks is just a list of Content from the Block List Editor

```csharp
public List<Content> ContentBlocks { get; set; } = content.GetValue<List<Content>>("Content") ?? [];
```

The RenderBlock looks for components that implement the

```csharp
public interface IContentBlockView : IContentBlock
{
    RenderMode RenderMode { get; }
}
```

This allows you to render your component in the front end by matching the element type alias. All you have to do is create a Blazor component and implement IContentBlockView like so.

```csharp
@implements ZauberCMS.Core.Content.Interfaces.IContentBlockView
@if (Content != null)
{
    <div class="fs-6">
        @((MarkupString)(Content.GetValue<string>("Content") ?? string.Empty))
    </div>
}

@code {
    [Parameter] public Content? Content { get; set; }
    public string ContentTypeAlias => "RTEBlock";
    public RenderMode RenderMode => RenderMode.Static;
}
```

The above is an example of pulling data from the Rich Text Editor and displaying it to the user. The important part is making sure I **set the ElementTypeAlias to match the content type** being used on this content.

### RenderMode

Because these blocks are Blazor and being rendered in .Net MVC, we can specify how we want them to be rendered. Most of the time you will want them to be static, but you can make them InteractiveServer if you have some interactive functionality in them. Just remember to add the Blazor .js script in your layout or any interactivity will not work.

{% content-ref url="/pages/3WRKOGBqfUMeQeOvRWEF" %}
[Querying Data](/zaubercms/creating-a-website/querying-data.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://aptitude.gitbook.io/zaubercms/extending-zaubercms/blocklisteditor/content-block.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
