2017 © Pedro Peláez
 

magento-module cms-by-locale-extension

Magento Cms By Locale Extension

image

webgriffe/cms-by-locale-extension

Magento Cms By Locale Extension

  • Friday, January 2, 2015
  • by mmenozzi
  • Repository
  • 9 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Webgriffe Cms By Locale

Magento extension that generates static content for each store views grouped by locale., (*1)

Installation

Please, use Magento Composer Installer and add webgriffe/cms-by-locale-extension to your dependencies. Also add this repository to your composer.json., (*2)

"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., (*3)

In the first scenario, create a class like, (*4)

class Ernani_Cms_Model_Entity_Setup extends Webgriffe_Cms_Model_Entity_Setup { }, (*5)

In the second, add the following lines in config.xml:, (*6)

<config>
    <global>
        <resources>
            <YOUR_MODULE_ALIAS_setup>
                <setup>
                    <module>YOUR_MODULE_NAME</module>
                    <class>Webgriffe_Cms_Model_Entity_Setup</class>
                </setup>
            </YOUR_MODULE_ALIAS_setup>
        </resources>
    </global>
</config>

Then, in your data scripts, you may call the methods: * $this->generateCmsPage($urlKey, $content) * $this->generateStaticBlock($identifier, $content), (*7)

Example

Magento Stores: image Note: the store view with code it_it has locale it_IT, all others are en_US, (*8)

data-install-1.0.0.php:, (*9)

<?php
/* @var $installer Webgriffe_Cms_Model_Entity_Setup */
$installer = $this;

$installer->startSetup();

$installer->generateCmsPage('temporary', 'Temporary content');

$installer->endSetup();

Cms pages created: image, (*10)

The Versions

02/01 2015

dev-master

9999999-dev

Magento Cms By Locale Extension

  Sources   Download

OSL-3.0

The Development Requires

  • webgriffe/magento_ant_build dev-master