문제

I am getting category description on 2columns-left.phtml by following code:

display category description

Text are showing but media wysiwyg images not showing on frontend.

I am getting images in WYSIWYG Editor like:

<img alt="" src="{{media url="wysiwyg/category_quality_image/em1.jpg"}}" / loading="lazy" fetchpriority="high">

How to display images on frontend of category description?

도움이 되었습니까?

해결책

replace your code with

<?php 
$_description = Mage::getModel('catalog/layer')->getCurrentCategory()->getDescription();
echo $this->helper('catalog/output')->categoryAttribute($_category, $_description, 'description');
?>

다른 팁

Try this code:-

$_cmsHelper = Mage::helper('cms');
$_process = $_cmsHelper->getBlockTemplateProcessor();
echo $_process->filter($category_description);

you can try this:

<?php echo '<img alt="" src="{{media url="wysiwyg/category_quality_image/em1.jpg"}}" />' ?>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top