Skip to content


Subversion checkout URL

You can clone with
Download ZIP



This is the first beta release of the new Open Power Template branch.
It focuses on adding lots of new features, and improving lots of

Please note that some features are not implemented yet and some
of them may not fully work.


OPT 2.1 requires:

 - PHP 5.3 or newer (PHP 5.2 is not supported anymore)
 - OPL core 2.1

What does not work?

Below, you can find the list of things that do not work yet:

 - Full support for the backward compatibility mode.
 - Command Line Interface.
 - opt:prepend and opt:append attribute handling.
 - NestedTree data format for trees.
 - Data formats for components and bloks.
 - Third opt:switch handler is missing.
 - Some smaller bugs in the new expression parser.
 - The migration to the new exception system is not finished.
 - assign() template function.
 - `opt:selector` does not use `opt:switch` API yet.

What has changed?

There are some backward incompatibilities between 2.0 and 2.1 branch. On the API side, they mostly
concern the OPL core which has been rewritten from scratch. The only bigger changes in the public
API are in the component interface. There are some small changes in the compiler API. If you have
some custom instructions or data formats, you must fix them.

Some backward incompatibility changes can be found in the template language, however you will
be able to fix them automatically in the final version thanks to the command line interface
and backward compatibility mode. Both of them make use of the new compiler subsystem: migration
which has been designed to deal with template language modifications.

Below, you can find a short list of modifications and additions:
 - The expression namespaces "parse:" and "str:" are no longer namespaces. The
   expression engine is selected within the attribute value, i.e.

       <div class="parse:$foo" />

 - New expression parser with many new features, such as functions with named arguments,
   container constructors, compound operators and dynamic container keys.

 - Camel-case instruction tags have been renamed to use the pause-convention. I.e
   `opt:onEvent` is now called `opt:on-event`.

 - `opt:insert` has been renamed to `opt:use`.

 - `opt:sectionelse`, `opt:showelse` etc. have been renamed to `opt:else`.

 - `opt:root` no longer provides `include` attribute. Instead, you can use any number of
   new `opt:load` tags which work with `opt:extend`, too.

 - The section element body can be now enclosed within the new tag `opt:body`.

 - New, optional `opt:if` syntax:

     <opt:if><opt:condition test="$condition"> ... </opt:condition> ... </opt:if>

 - Long-if feature which allows to put unconditional code between the conditional
   branches of opt:if.

 - New, powerful instruction: opt:switch.

 - Support for procedures added (run-time, dynamic snippets).

 - Snippets and procedures can be now injected into components and blocks.

 - Snippets can have arguments.

 - opt:content attribute has been extended with some new features that allow to prepend
   or append an extra content to the evaluated expression.

 - opt:on has been renamed to opt:omit-tag

This is what I remember for now.



A new stable release of Open Power Template focuses on bugfixing. There is just a small
improvement of `isImage()` template function which is now able to recognize 'jpeg' extensions.
This contribution was made by krecik.

The fixed bugs

 - #169
 - #171
 - Wrong character class definitions for unicodeNames option enabled.

Compatibility information

Starting from this version, Open Power Template no longer closes all active output buffers
during Opt_Class object destruction. The buffer management has been moved to HTTP
output which now closes only the buffer it creates.


[Opt] Tagging version 1.1.5
Something went wrong with that request. Please try again.