Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:exptemplateconvertdiff

Print the conversion of one template to another engine on stdout, without writing anything (--file, --to-engine, --from-engine).

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/commands/exptemplateconvertdiff.md

On this page

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 --help

Help 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

OptionValueHelp
--filerequiredthe template to convert
--from-enginerequiredits engine: tpl, stpl or twig (default: from the file ending)
--to-enginerequiredthe engine to convert it to: tpl, stpl or twig
--againstrequiredcompare 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 ...).


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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x