skeeks/cms-related-handler-extra

Related property handler for skeeks cms

1.1.0 2017-11-07 10:09 UTC

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist skeeks/cms-related-handler-extra "*"

or add

"skeeks/cms-related-handler-extra": "*"

Configuration app


'components' =>
[
    'cms' =>
    [
        'relatedHandlers' => [
            'skeeks\cms\rhExtra\RelatedHandlerExtra' =>
            [
                'class' => 'skeeks\cms\rhExtra\RelatedHandlerExtra'
            ]
        ],
    ],

    'i18n' => [
        'translations' =>
        [
            'skeeks/rh/extra' => [
                'class'             => 'yii\i18n\PhpMessageSource',
                'basePath'          => '@skeeks/cms/rhExtra/messages',
                'fileMap' => [
                    'skeeks/rh/extra' => 'main.php',
                ],
            ]
        ]
    ]
],

How to use


<? if ($extra = $model->relatedPropertiesModel->getAttribute('extra')) : ?>
    <? foreach($extra as $row) : ?>
        <p>
            <strong><?= \yii\helpers\ArrayHelper::getValue($row, 'name'); ?>:</strong> <?= \yii\helpers\ArrayHelper::getValue($row, 'value'); ?>
        </p>
    <? endforeach; ?>
<? endif; ?>

##Links

skeeks!
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | en.cms.skeeks.com | cms.skeeks.com | marketplace.cms.skeeks.com