> For the complete documentation index, see [llms.txt](https://varian.gitbook.io/varian-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://varian.gitbook.io/varian-docs/tagsmetadata/tags-metadata.md).

# 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="https://85507437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk78LHfXaaau9UrBYk0Pe%2Fuploads%2FwelrdvPmYV6V2O1YJ9Kj%2Fimage.png?alt=media&amp;token=a66d4f2e-0312-4342-9645-a743ef6e9dba" 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="https://85507437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk78LHfXaaau9UrBYk0Pe%2Fuploads%2Fxzf1OeY0j6nvxUM4kYhm%2Fimage.png?alt=media&amp;token=ba3a60d8-963c-4e3b-89a8-df29bf1b1b19" 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="https://85507437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk78LHfXaaau9UrBYk0Pe%2Fuploads%2FuwIGwLUIxJWymuMIDxyV%2Fimage.png?alt=media&amp;token=c2b2a23f-4245-4ec0-b30a-db30c2fbd462" alt=""><figcaption></figcaption></figure></div>

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

<div align="left"><figure><img src="https://85507437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk78LHfXaaau9UrBYk0Pe%2Fuploads%2FeMLImEEZCeT8awWRr4tP%2Fimage.png?alt=media&amp;token=ddc0aafb-e3ae-4007-8093-95c4b71398c9" alt=""><figcaption></figcaption></figure></div>

Example to retrieve the metadata:&#x20;

<div align="left"><figure><img src="https://85507437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk78LHfXaaau9UrBYk0Pe%2Fuploads%2FWEvaOMhHQQKnWoGskF10%2Fimage.png?alt=media&amp;token=98ecd822-369c-4e3c-b7a9-b36fb207d299" 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
