Customizing using the html directory
Some versions ago, we have added the possibility to include domains in the customization using the html directory. This becomes useful when modifications through the web interface are too clumsy.
The key for this is a setting in the pbx.xml called http_content. If it is set to all, then the PBX will attempt to read files for users and domains, if it is set to domain, then it will do it only for domains, and if it is set to none, it will not read any files from the file system.
Generally the path name for reading files from the file system is html/domain/user/filename for user-dependent files, html/domain/filename for domain-dependent files, and html/filename for global files. There are a few catches with it, for example if the domain name is the same like a filename. However because the file names usually end with file type suffixes, that case should be really exceptional.
The logo is a good example for this. By default, the path for the logo is html/img/logo.svg. Lets say you have a domain called abc.xyz, then you could put the logo for that specific domain into the path html/abc.xyz/img/logo.svg. You could even put a specific logo for one user, although that should be a unusual case, it would still be possible.
There are still some exceptions for files that will remain global. Those files are the pnp.xml, the ringtones.xml and the dialplans.xml. Those files are at this point simply global and it does not make sense to read them from a domain context.
The possibility to drop the logo in the domain and user directory will be available in versions after 56.0.
So for example for reading the logo, the PBX tries the following paths:
- User-level webpage customization
- Domain-level webpage customization
- System-level webpage customization
- File system: <pbx working dir>/html/<domain>/<user>/img/logo.svg (if htttp_content = "all")
- File system: <pbx working dir>/html/<domain>/img/logo.svg (if htttp_content = "all")
- File system: <pbx working dir>/pbxwebui/img/logo.svg (if htttp_content != "none")
- File system: <pbx working dir>/html/img/logo.svg (if htttp_content != "none")
- Builtin logo