The Server Directory service displays the contents of a directory on the installation server in the area of your choice, allowing the user to download files from this directory.
The list of directories accessible by the service must first be authorized in the administration interface configuration.
See the Administration Manual documentation page .
Select a site page and a zone of your choice. Go to the "Add a service" menu and click on "Server directory".
Parameters | Description | Mandatory |
---|---|---|
Title | Service title | No |
Server directory |
Enter the path of the directory you wish to display.
The contents of the selected directory (folders + files) will be displayed.
Example of a directory path for Windows: file:/D:/AmetysDemo/ Example of a directory path for Linux: /home/cms/xxx
The list of directories proposed here corresponds to the server directories authorized by the administrator. Please refer to the Administration manual page of the Ametys documentation for details. |
Yes |
Enable dynamic paths |
This makes it possible to use customized directory paths based on a current context. For example: - D:/Documents/Formations/${login} est remplacé par l'identifiant de connexion de l'utilisateur connecté, cela signifie que seulement les utilisateurs connectés auront accès au répertoire du serveur. - ${login[population=population1,population2]} is replaced by the user's login ID, only if he/she belongs to the 'population1' or 'population2' user populations - ${population} is replaced by the current user's population ID. - ${site} is replaced by the current site, which can be used in the case of multi-site. - ${lang} is replaced by the current language, to separate translations of a site.
Note: si vos utilisateurs sont dans plusieurs populations, il est conseillé de préciser la population ${login[population=...]} ou d'utiliser ${population} dans le chemin du répertoire au cas où 2 utilisateurs pourraient avoir le même identifiant |
No
|
Display |
Choice of service rendering. |
Yes |
Maximum depth |
Selects the folder tree display limit at the specified depth. It's an integer. Some values have special significance: - empty: no limitation, the entire directory is displayed. - value 0: no folders or files are displayed - value 1: only files and folders at the root of the selected directory are displayed |
No |
The rendering of the service depends on the graphic charter used.
Here's an example of rendering with the "File tree" view.