Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Subscriptions
English French
English French

Why are my Content fields in Templates not showing?

An apostrophe in the Content field can cause issues when the field is used inside an Angular function.

To resolve this, try one of the following approaches.

Option 1: Use hexadecimal values for quotes

Update the Content fields by replacing quote characters with their hexadecimal values.

Option 2: Replace Angular code with template directives

For regular text or class fields, apostrophes work as expected. If possible, update the template syntax to use template directives instead of Angular code.

Original code:

HTML
<div ng-if="'[%% mobile-copy %%]'" class="mobile">[%% mobile-copy %%]</div>
<div ng-if="!'[%% mobile-copy %%]'" class="mobile">[%% desktop-copy %%]</div>

Updated code:

HTML
<div class="mobile">[%% mobile-copy %%]</div>
<div class="desktop">[%% desktop-copy %%]</div>

Option 3: Adjust the content field text

If the content field text contains an apostrophe, either change the copy or replace the straight apostrophe character (') with the curly apostrophe character (’).

Last updated: