I asked the question but did not get an answer to it. Now i understand how get all block in pages, but i get only current page blocks. For example:

  $layout = Mage::app()->loadArea(Mage_Core_Model_App_Area::AREA_FRONTEND)->getLayout();
  /* then i get all blocks from that page*/

How to get frontend area, when i in backend?? I know that it should be simple, but when i want get AREA_FRONTEND, i get my current page, but i need get frontend area.


Old question, but here goes.

Have not tried this myself, but may help in the right direction. $selectedStoreId will be the id of the sore who's theme you want to get to. This is how preview in magento EE does it.



$designChange = Mage::getSingleton('core/design')

if ($designChange->getData()) {

and use Mage::app()->getLocale()->revert(); to go back to admin theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.