# Context Tags

## What are Context Tags?

A context tag is a way of associating content in a template to the actual data values that will be present in the individual instances of that template. In other words, it is a placeholder or marker that is used to indicate where specific data values should be inserted when the template is instantiated or used to create a new document, page, notification, or other piece of content.

When creating a template, you can use context tags to define specific areas where dynamic data should be inserted when the template is used to create an instance. The dynamic data is retrieved from various sources e.g. form submissions, assessment task form data, user profile info, organization info, and more. &#x20;

For example, a template for a business letter might include context tags for the recipient's name, address, and date, which can be replaced with actual data when the template is used to create a new letter.

It allows separating the structure of the data and the actual values of that data, so that the same template could be reused with different data values, creating different outputs.

## Using Context Tags

In Onestop, context tags are used in document templates, notification templates, field labels, field help text, and more.

* When in configuring a template in onestop, you will see a "Use Conext Tags" button

<figure><img src="/files/4nuq8elhhOyjPiHL1phH" alt=""><figcaption><p>Context Tags button</p></figcaption></figure>

* Click on the button
* A popup of all available context tags will appear for you to use
* The context tag popup has the different tag categories on the left and the tags for the currently selected category on the right as shown below

<figure><img src="/files/AWJ21fQi2txg3t3sId6l" alt=""><figcaption><p>Tag categories and tags</p></figcaption></figure>

* To add a context tag to your template, simply click on the tag you wish to use and it will be appended to your template.

## Accessing Raw Values

When using the above context tags, Onestop will render the value in your target e.g. document, email etc. as a pre-rendered HTML value. If you want more control over how the value is rendered, you can opt-in to using the raw value of the field by appending **\_\_raw** to the tag. This will expose the raw json value of the field entry and you can use the Django Templating Language in your template to render more complex UI logic e.g. for loops.


---

# Agent Instructions: 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:

```
GET https://admin-docs.onestop.site/managing-services/context-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
