开发者

magento using html codes in category name

We're trying to use HTML code in some category names, i.e. to show quarter (1/4) symbols etc.

But this is showing up in HTML code everywhere, is there something global I can do to resolve it, or do I have to go through all the code to strip out escapeHTML etc...

I know for attributes 开发者_开发知识库you can manage this by 'show html on front end', but nothing for categories names as well becuase this show up in the meta tags.... argh!

Cheers


Couldn't globally turn it off anywhere so had to go round stripping it out.


If you want to show it in some places and not others, you are basically constrained to running the names through some kind of translation function only in the places you want translation. As a fictitious example:

<h2><?php print Mage::helper("somemodule/format")->formatString($_category->getName()); ?>

Normal calls (e.g. meta tags) would not be affected by this. Note that this would require building some kind of translation table for proper quotes, quarter-marks, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜