telosystools

Open full view…

Where to place ressources to be copied from template to generate

michaelrall
Mon, 05 Apr 2021 19:50:31 GMT

Hello, where do I have to place static files that should be copied to the output, and how to configure the template to do that? kind regards

Telosys Team
Thu, 08 Apr 2021 14:24:44 GMT

Hi, In Telosys all static files (supposed to be copied without code generation) are called "Resources". They are located in the bundle of templates and referenced as "resources" with "R" type in the "templates.cfg" file. For example, have a look at the "PHP 7 web MVC" bundle https://github.com/telosys-templates-v3/php7-web-mvc This bundle contains static resources (".php" files) located in "/resources/view" (https://github.com/telosys-templates-v3/php7-web-mvc/tree/master/resources/view). See the "*templates.cfg*" file, the static resources are declared like this : --- files view/commons ; ; /view/commons ; /view/commons ; R files view/layout ; ; /view/layout ; /view/layout ; R --- Don't forget to launch the generation "with resources" ( "-r" ) --- gen * * -r --- Kind regards. PS: if you like Telosys don't forget to add a star on GitHub https://github.com/telosys-tools-bricks/telosys-cli