Prestashop和Smarty

Prestashop和Smarty

问题描述:

i have problem with smarty templating on Prestashop.

I want to echo product description with html tags (wysiwyg) but it gives me string with striped html tag or nothing.

{$product.description_short|unescape|strip_tags:false}

unescape and strip_tags:false not change anything. String is still striped. Using only {$product.description_short} display nothing.

i try to use {php} {/php} but then everything i get is 500 error.

This is on listing .tpl

On single product view description works fine with that code {$product->description_short}

我在Prestashop上遇到智能模板的问题。 p>

我想回声 产品描述与html标签(wysiwyg),但它给我带有条纹html标签的字符串或没有。 p>

  {$ product.description_short | unescape | strip_tags:false} 
  代码>  pre> 
 
 

unescape code>和 strip_tags:false code>不会改变任何东西。 字符串仍然是条纹的。 仅使用 {$ product.description_short} code>不显示任何内容。 p>

我尝试使用 {php} {/ php} code>但是我得到的一切都是500错误。 p>

这 正在列出.tpl p>

单个产品视图说明可以正常使用该代码 {$ product-> description_short} code> p> div >

If I understand what do you want, have you tried this:

{$product.description_short|escape:'htmlall':'UTF-8'}