i am new to magento. Can you please help me to find a solution?
Inserted 3 widget in CMS -> Pages. I have to do display those widgets in home page.
I used this code
$aCmsPage = Mage::getModel('cms/page')->load('main-page', 'identifier');
echo $theContent = $aCmsPage->getContent();
but output was like this
{{widget type="meigeewidgets/featuredcategory" featured_category="category/5" template="meigee/meigeewidgets/slider.phtml" products_amount="15" slider_speed="1000" slider_displayslideqty="4" slider_moveslideqty="1" slider_easing="easeInQuad" widget_id="7646"}}
I have tried this code: echo Mage::helper('cms')->getPageTemplateProcessor()->filter($theContent);
if i add menus in magento, it will display in wp
iam not getting answer still now pls anyone can help me
-
Wasnt this exact same question asked 14 hours ago? magento.stackexchange.com/questions/9117/…Sander Mangel– Sander Mangel2013年10月09日 06:07:58 +00:00Commented Oct 9, 2013 at 6:07
1 Answer 1
You are currently getting the raw content of the CMS page. You have to process all short-codes.
Try to:
echo Mage::helper('cms')->getPageTemplateProcessor()->filter($theContent);
-
no result it remains blankuser2859416– user28594162013年10月09日 07:48:39 +00:00Commented Oct 9, 2013 at 7:48
-
the code is not working it shows blankuser2859416– user28594162013年10月09日 09:48:16 +00:00Commented Oct 9, 2013 at 9:48
-
magento caches are flushed? anything in the logs?Tim Bezhashvyly– Tim Bezhashvyly2013年10月09日 12:11:52 +00:00Commented Oct 9, 2013 at 12:11
-
yes, there are files in log and report folderuser2859416– user28594162013年10月09日 13:54:19 +00:00Commented Oct 9, 2013 at 13:54