NetLife Guru

Handling Curly Brackets in Text Content

In the context of a template engine that utilizes curly brackets for identifying code, special attention is needed when curly brackets are part of the intended text output. Incorrect usage can lead to errors, as the engine might interpret them as code.

Correct Usage of Curly Brackets in Text:

For example

    {layout}
        <strong>This is my text with {{curly brackets}}</strong>
    {/layout}

This will correctly output:


        This is my text with {curly brackets}

Why Double Brackets?