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.
![Scopes in Quantum Manager](https://docs.norrnext.com/~gitbook/image?url=https%3A%2F%2Fnorrnext.com%2Fimages%2Fdocs%2Fquantum-manager%2Fquantum-manager-scopes.png&width=768&dpr=4&quality=100&sign=73ff7ab&sv=1)
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/ |
Documents | https://yourdomain.com/ |
Music | https://yourdomain.com/ |
Video | https://yourdomain.com/ |
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.
Creating custom scopes
Creating custom scopes gives you extra abilities.
Here is an example:
![Creating custom scope in Quantum Manager](https://docs.norrnext.com/~gitbook/image?url=https%3A%2F%2Fnorrnext.com%2Fimages%2Fdocs%2Fquantum-manager%2Fcustom-scope1.png&width=768&dpr=4&quality=100&sign=c6fb1867&sv=1)
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}
Do not forget to update robots.txt file, if new folders were created in site root using the scope.
Last updated