Scopes
Last updated
Last updated
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.
Go to Options > Global Options tab and you will find scopes.
There are default scopes to be used according to its names:
Images
https://yourdomain.com/images
Documents
https://yourdomain.com/docs
Music
https://yourdomain.com/music
Video
https://yourdomain.com/video
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.
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 gives you extra abilities.
Here is an example:
You can create multiple custom scopes and use variables to get much precisely result.
{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.