Created
July 18, 2014 08:26
-
-
Save roman204/6afd9c667112a62f021d to your computer and use it in GitHub Desktop.
create cms/block in installscript
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 | |
/** | |
* Created by PhpStorm. | |
* User: rhutterer | |
* Date: 18.07.14 | |
* Time: 09:21 | |
*/ | |
$installer = $this; | |
//installer for footer cms-blocks | |
$storeView = Mage::getModel('core/store')->load('direct_de', 'code'); | |
for($x = 1; $x <= 3; $x++) { | |
Mage::getModel('cms/block') | |
->setIdentifier('footer_links_' . $x) | |
->setStores(array($storeView->getId())) | |
->setIsActive(true) | |
->setTitle('footer.links.' . $x) | |
->setContent('<p>footer.links.' . $x . '</p>') | |
->save(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment