# Scopes

One of the important part of Quantum Manager is Scopes. What is it mean?

Scope refers to the visibility of variables. In other words, which parts of your program can see or use it.

Using scopes you can create a navigation tree for quick access to the associated folders. It is typical to modern Operation Systems like macOS or Windows, so whenever the folder is located on the site, there is a way to create quick access to it by adding the scope.

<figure><img src="https://norrnext.com/images/docs/quantum-manager/quantum-manager-scopes.png" alt="Scopes in Quantum Manager"><figcaption><p>Scopes in Quantum Manager</p></figcaption></figure>

Go to **Options > Global Options tab** and you will find scopes.

There are default scopes to be used according to its names:

| Scope name | Path to the folder                |
| ---------- | --------------------------------- |
| Images     | <https://yourdomain.com/`images`> |
| Documents  | <https://yourdomain.com/`docs`>   |
| Music      | <https://yourdomain.com/`music`>  |
| Video      | <https://yourdomain.com/`video`>  |

<br>

<figure><img src="https://norrnext.com/images/docs/quantum-manager/quantum-manager-scopes1.png" alt="Quantum Manager - default scopes"><figcaption><p>Default scopes</p></figcaption></figure>

You can set up a custom path to your folder. Note: the path comes from the site root, so you can access folders outside of `/images` folder. **If no folder exists, the folder will be created** as soon as you go to the component dashboard. It is possible to enable or disable default scopes according to your requirements.

### How to separate/sort files of different formats? (media, documents)

Apart from pictures, there might be audio files, video, .zip archives and etc. on your site. The best way is to keep all these files separately.

Keep all non-graphic files by type outside of `/images` folder. We can configure several different options for uploading files into the 'right' folders, depending on the situation and file type. For instance, for documents you can use `/media/docs` path, for audio it might be `/media/audio`, etc.

<figure><img src="https://norrnext.com/images/docs/quantum-manager/default-scopes.png" alt="Default scopes in Quantum Manager"><figcaption><p>Default scopes in Quantum Manager</p></figcaption></figure>

### Creating custom scopes

Creating custom scopes gives you extra abilities.

Here is an example:

<figure><img src="https://norrnext.com/images/docs/quantum-manager/custom-scope1.png" alt="Creating custom scope in Quantum Manager"><figcaption><p>Creating custom scope in Quantum Manager</p></figcaption></figure>

<figure><img src="https://norrnext.com/images/docs/quantum-manager/custom-scope2.png" alt="Creating custom scope in Quantum Manager"><figcaption><p>The result</p></figcaption></figure>

You can create multiple custom scopes and use variables to get much precisely result.

| Variable:  | Action:              |
| ---------- | -------------------- |
| {user\_id} | ID of current user   |
| {year}     | current year         |
| {month}    | curreny month        |
| {day}      | current day          |
| {hours}    | current hour         |
| {minutes}  | minutes              |
| {second}   | seconds              |
| {unix}     | UNIX time in seconds |

Example of use: `images/{user_id}/{year}-{month}-{day}`

{% hint style="info" %}
Do not forget to update robots.txt file, if new folders were created in site root using the scope.
{% endhint %}


---

# 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://docs.norrnext.com/quantum-manager/best-practices/scopes.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.
