2

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

1

1 Answer 1

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); 
answered Oct 9, 2013 at 5:23
4
  • no result it remains blank Commented Oct 9, 2013 at 7:48
  • the code is not working it shows blank Commented Oct 9, 2013 at 9:48
  • magento caches are flushed? anything in the logs? Commented Oct 9, 2013 at 12:11
  • yes, there are files in log and report folder Commented Oct 9, 2013 at 13:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.