dragonhong641016 2016-01-20 07:07
浏览 27
已采纳

产品名称中的Magento HTML无效

I am working on Magento CE 1.9 in theme rwd
I have <br> tag in product names but still product names are rendered as single line.
I already set Allow HTML Tags on Frontend to Yes for name attribute from Manage attributes.
How I can convert <br> to new line character so that product name will be shown on 2 lines?

Thanks in advance for any help.

  • 写回答

2条回答 默认 最新

  • duanmianhong4893 2016-01-20 10:28
    关注


    I am adding answer here because I was unable to properly display answer in comment.

    @Zefiryn: Tried answers above. But I followed approach suggested by you. But I did not make any changes directly in core files, instead I copied app/code/core/Mage/Catalog/Helper/Output.php from core codepool to app/code/local/Mage/Catalog/Helper/Output.php into local codepool.
    Changed following condition on line number 125

    if ($attribute->getFrontendInput() != 'price') {
        $attributeHtml = $this->escapeHtml($attributeHtml);
    }
    


    TO

    if ($attribute->getFrontendInput() != 'price') {
        if($attributeName != 'name') {
            $attributeHtml = $this->escapeHtml($attributeHtml);
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案
  • ¥50 winform中使用edge的Kiosk模式
  • ¥15 关于#python#的问题:功能监听网页
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化