Thalassa CMS logo

Thalassa CMS

Generic files (outside the web tree)

Generic files are perhaps the simplest kind of objects generated by Thalassa: actually, it's just an (almost arbitrary) text file placed wherever you want, not within your site's tree (for files within the tree, the page section group should be used). These files are not intended to be HTML pages, their real purpose is to communicate with third-party software, e.g., you can create a configuration file for something external, or even a shell script (well, think carefully before you do). However, you can generate an HTML page this way if you really want so. Well, if you do, please contact the authors of Thalassa and share your experience, as we've got no idea why the heck anyone might need to create web pages in this manner.

To create a generic file, use an ini file section [genfile NAME]. Three parameters are recognized: path, content and chmod.

The path parameter is just a file name, either absolute or a relative (to the working directory of Thalassa, not to your site's root!). The value defaults to the NAME of the section. Please note that if you do specify this parameter, its value is passed throught the macroprocessor (primarily to give one access to the options), but if you omit the parameter, the default value (NAME) is used without any processing.

The content parameter's value defines what to write to that file; the exact content of the file will be the macroprocessing result of the value.

As usual (see here and here), the chmod parameter must contain an octal number specifying the access mode to set for the file. If this parameter is not specified, no fchmod call will be performed, so the file will have default permissions as determined by your active umask. The value of this parameter is not passed through the macroprocessor.

© Andrey V. Stolyarov, 2023, 2024