Last active
March 8, 2016 08:29
-
-
Save qaiserali/73057320b97ace5f7ccd to your computer and use it in GitHub Desktop.
Load block outside the Magento scope
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app/Mage.php'; | |
umask(0); | |
Mage::app(); | |
$layout = Mage::getSingleton('core/layout'); | |
//load default xml layout handle and generate blocks | |
$layout->getUpdate()->load('default'); | |
$layout->generateXml()->generateBlocks(); | |
/get the loaded head and header blocks and output | |
$headBlock = $layout->getBlock('head'); | |
echo $headBlock->toHtml(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment