Last active
January 3, 2016 01:59
-
-
Save willboudle/8392554 to your computer and use it in GitHub Desktop.
Create CMS Page programmatically - Magento
This file contains hidden or 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 | |
| // Create a new cms page for a . | |
| $cmsPageData = array( | |
| 'title' => 'Test CMS Page Title', | |
| 'root_template' => 'one_column', | |
| 'meta_keywords' => 'meta,keywords', | |
| 'meta_description' => 'meta description', | |
| 'identifier' => 'this-is-the-page-url', | |
| 'content_heading' => 'content heading', | |
| 'stores' => array(0),//available for all store views | |
| 'content' => "Hello I'm a new cms page." | |
| ); | |
| Mage::getModel('cms/page')->setData($cmsPageData)->save(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment