Para::Frame::Template::Plugin::Meta::Interpolate - Allow evaluation of META parameters
[% META next_template = '~$home/' %]
Goes to the site home page next
[% META title='-"404 - " _ loc("File not found")' %]
The value is enclosed in ''
. The initial -
tells us to
interpolate the rest as if it said:
[% title = "404 - " _ loc("File not found") %]
The _
is a concatenation operator. And Para::Frame::L10N/loc is
the translation function.
If value starts with a '-', the rest of value will be evaluated as a TT expression. (No expressions are normally allowed in META.)
If value starts with a '~', the rest of value will be evaluated as a TT string with variable interpolation. It's the same as for '-' but with the extra "" around the value.
It does not sets the variable if it's already true. That enables you to set it in another way.
[* META otitle = '-otitle=["[_1]s administration pages", site.name]' *]
The normal use is to set the variable with the result of the template output. But to give complex values to a variable, like a list, you can do it as above.
Para::Frame, Para::Frame::Manual::Templates, Para::Frame::TT::header, Template::Plugin