Skip to content

[NFR] Volt with "literal" or "verbatim" tag #17085

@vhbmsp

Description

@vhbmsp

There should be a tag like the Smarty {literal} tag http://www.smarty.net/docsv2/en/language.function.literal

witch allows us to create a block of content that will be not parsed by the volt compiler and outputed as is!

This is useful if you want to put xml headers into a volt template like this:

<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type='text/xsl' href='/s/sitemap.xsl'?>

without having the <?xml breaking the compiled template. Other use cases is if you really want to have in you html things like "{{ I relly want {{ }} in html }}"

This cold be achieved with something like

{% literal %}
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type='text/xsl' href='/s/sitemap.xsl'?>
{% endliteral %}

{% literal %}
<b>{{</b> I relly want {{ }} in html <b>}}</b>
{% endliteral %}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Labels

5.0The issues we want to solve in the 5.0 releasenew feature requestPlanned Feature or New Feature Request
No fields configured for Feature.

Projects

Status
Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions