exp:exptemplateconvertdiff
Print the conversion of one template to another engine on stdout, without writing anything (--file, --to-engine, --from-engine).
Script bin/php/exptemplateconvertdiff.php, code in kernel/private/classes/commands/exptemplateconvertdiff.php. Run it from the installation root, as the user the web server runs as:
./console exp:exptemplateconvertdiff --help
./console exp:template:convert:diff --help
php bin/php/exptemplateconvertdiff.php --helpHelp text
Print the conversion of one template to another engine, without writing anything
The engine of --file follows from its ending unless --from-engine is given. The converted text goes
to stdout, the NOTE lines of what could not be converted exactly to stderr; with --against=<file> the
converted text is compared with that file (a target written before and perhaps edited by hand) and
the differences are printed as a unified diff.
./console exp:template:convert:diff --file=design/<design>/templates/<name>.tpl --to-engine=twig
./console exp:template:convert:diff --file=<name>.tpl --to-engine=twig --against=<name>.twig
Exit code: 0 converted (no differences with --against); 1 notes, a check failed, or differences;
2 wrong options; 3 the conversion is not available.Options
| Option | Value | Help |
|---|---|---|
--file | required | the template to convert |
--from-engine | required | its engine: tpl, stpl or twig (default: from the file ending) |
--to-engine | required | the engine to convert it to: tpl, stpl or twig |
--against | required | compare the conversion with this file and print a unified diff |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Related
Generated by ./console exp:help:examples from bin/php/exptemplateconvertdiff.php, kernel/private/classes/commands/exptemplateconvertdiff.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.