# Tags Metadata

A simple config system which stores metadata for tags inside `collections`.

`O_TagMetadataCollection`: This is the class that hosts a collection of metadata

Example:&#x20;

<figure><img src="/files/YhxhTedGmUAKBOK4b8kx" alt=""><figcaption></figcaption></figure>

To have the system pick up your collection, go into `Project Settings` -> `Plugins` -> `TagMetadata Settings` and add your collection to the array.

<figure><img src="/files/ifR1Rt8t0cMvD2PEwOOm" alt=""><figcaption></figcaption></figure>

`O_TagMetadata`: The object that is added to the tags Metadata array to grant the tag whatever data you want to add.

Example:

<div align="left"><figure><img src="/files/dbYRSU1jRaF30rqCyaZj" alt=""><figcaption></figcaption></figure></div>

The system comes with three functions to retrieve the metadata:&#x20;

<div align="left"><figure><img src="/files/Nlob668oH9JDVH1CA0YR" alt=""><figcaption></figcaption></figure></div>

Example to retrieve the metadata:&#x20;

<div align="left"><figure><img src="/files/wLc3DkflNgXfJqtxvA7T" alt=""><figcaption></figcaption></figure></div>

## Notes

* All of the collections are hard referenced by the config, meaning they are loaded at all times. Be very mindful of what assets you are referencing and always use a soft reference.
* This system is meant for fixed variables, modifying any variables on the metadata objects during runtime is not recommended.

## Base Classes

* `O_TagMetadata` - The metadata object that will host your custom data.
* `O_TagMetadataCollection` - The collection that hosts the metadata objects and associates them with a tag.

## Change log:

### 1.2

* Collections are now soft referenced. Note, the functions will instantly load a collection if it isn't loaded. So use async load first. for optimal streaming.

### 1.1

* Collections now prevent identical tags.
* Added editor utility widget.
* Added `EditorAssistant` support


---

# 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://varian.gitbook.io/varian-docs/tagsmetadata/tags-metadata.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.
