https://github.com/webgriffe/cms-by-locale-extension
Magento extension that generates static content for each store views grouped by locale.
https://github.com/webgriffe/cms-by-locale-extension
Last synced: over 1 year ago
JSON representation
Magento extension that generates static content for each store views grouped by locale.
- Host: GitHub
- URL: https://github.com/webgriffe/cms-by-locale-extension
- Owner: webgriffe
- Created: 2014-12-23T13:36:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-02T13:32:45.000Z (over 11 years ago)
- Last Synced: 2025-01-29T10:35:51.554Z (over 1 year ago)
- Language: PHP
- Size: 223 KB
- Stars: 1
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Webgriffe Cms By Locale
=======================
Magento extension that generates static content for each store views grouped by locale.
Installation
------------
Please, use [Magento Composer Installer](https://github.com/magento-hackathon/magento-composer-installer) and add `webgriffe/cms-by-locale-extension` to your dependencies. Also add this repository to your `composer.json`.
"repositories": [
{
"type": "vcs",
"url": "git@github.com:webgriffe/cms-by-locale-extension.git"
}
]
Usage
-----
You may extend your Setup class from `Webgriffe_Cms_Model_Entity_Setup` or some config lines in your extension `config.xml`.
In the first scenario, create a class like
`class Ernani_Cms_Model_Entity_Setup extends Webgriffe_Cms_Model_Entity_Setup
{ }`
In the second, add the following lines in `config.xml`:
YOUR_MODULE_NAME
Webgriffe_Cms_Model_Entity_Setup
Then, in your data scripts, you may call the methods:
* `$this->generateCmsPage($urlKey, $content)`
* `$this->generateStaticBlock($identifier, $content)`
Example
-------
Magento Stores:

Note: the store view with code `it_it` has locale `it_IT`, all others are `en_US`
data-install-1.0.0.php:
startSetup();
$installer->generateCmsPage('temporary', 'Temporary content');
$installer->endSetup();
Cms pages created:
