A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jinja2cpp/Jinja2Cpp/issues/107 below:

Imlement 'meta' extension statement · Issue #107 · jinja2cpp/Jinja2Cpp · GitHub

Implement 'meta' statement which allows to define inside template some metainformation, accessible from the outside template. For instance, template:

{% meta json %}
{
    "output-type": "xhtml",
    "generator": "some-generator"
}
{% endmeta %}

after parsing:

Template tpl;
tpl.Load(...);
auto& meta = tpl.GetMetaData();
auto generatorType = meta["generator"]; // "some-generator"
auto outputType = meta["output-type"]; // "xhtml"

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4