> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/tutorials/building-widgets/basics/9-placeholders.md).

# 9. Placeholders

{% hint style="info" %}
There is a download available of this widget on the [Examples](/platform/tutorials/building-widgets/examples.md) page.
{% endhint %}

If you are familiar with the Modeler and creating page templates, then you are probably acquainted with components such as Alert, Panel, Conditional, and others. To create a similar widget, we need an additional feature called Placeholders. This feature allows you to reserve a section in your widget for content that you can add in the Template Editor within the Modeler. Let's create a simplified Alert component to explain the concept of placeholders.

#### Creating the Information Card Widget

1. Create a new widget called "Information Card."
2. Select the Placeholders tab.
3. Click on "New placeholder."
4. Name it "Contents."

You can provide a label and a description if you wish; these will be displayed in the Template Editor.

5. Copy and paste the following script:

```html
<div class="alert alert-info">
	<? render @Contents ?>
</div>
```

To keep this chapter simple, we are reusing the Alert Bootstrap classes. Other than that, there is one new statement here called `render`. As the name implies, this statement will render the contents of the `@Contents` placeholder. And that's it!

Now, place this widget on a template and notice that there is an additional container that was not previously shown in the other widgets we created. Try dragging some components, adding some text, or including other widgets in this container.

As you can see, placeholders are very easy to implement and incredibly powerful.


---

# 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://docs.wem.io/platform/tutorials/building-widgets/basics/9-placeholders.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.
