HTL Formatting with HTML tags inside is not working | Community
Skip to main content
jorgefdez205
Level 2
December 6, 2016

HTL Formatting with HTML tags inside is not working

  • December 6, 2016
  • 1 reply
  • 7660 views

Hi

 

I have a problem with the formatiing in HTL strings..... In my case this works:

<p>${"For more details see <b>Sale Conditions</b> and <b>Cats Terms and Conditions</b>" @ i18n, context='html'}</p>

and this works

${"For more details see {0} and {1}" @ i18n, context='html', format = ['Sale Conditions','Cats Terms and Conditions']}

but this one:

${"For more details see {0} and {1}" @ i18n, context='html',format = ['<b>Sale Conditions</b>','<b>Cats Terms and Conditions</b>']}

doesn't works!!!!! I getting this error :

<h1>Error during include of component '/apps/dog/components/cat'</h1><h3>Error Message:</h3>
<pre>org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.sightly.SightlyException: Parsing error in template /apps/dog/components/cat.html at line 27: token recognition error at: '&quot;' for expression ${&quot;For more details see {0} and {1} . &quot; @ i18n, context='html', format = [&quot;</pre><h3>Processing Info:</h3>
<table style='font-family: monospace'>
<tr><td>Page</td><td>=</td><td>/content/trp/en/<td></tr><tr><td>Resource Path</td><td>=</td><td>/content/en/jcr:content/responsivegrid/<td></tr><tr><td>Cell</td><td>=</td><td>checkout-traveller-list-review<td></tr><tr><td>Cell Search Path</td><td>=</td><td>contentpage|page/responsivegrid/<td></tr><tr><td>Component Path</td><td>=</td><td>/apps/td></tr></table>
<h3>Sling Request Progress:</h3>
<pre>


Somebody help me!!!!

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

smacdonald2008
Level 10
December 6, 2016
jorgefdez205
Level 2
December 6, 2016

Thanks smacdonald2008

I already spent a full day reading the specifications....

And no luck .....

smacdonald2008
Level 10
December 6, 2016

Why not use:

<p>${"For more details see <b>Sale Conditions</b> and <b>Cats Terms and Conditions</b>" @ i18n, context='html'}</p>