Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

README.md

Widget view model relited properties SkeekS CMS

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist skeeks/cms-rp-view-widget "*"

or add

"skeeks/cms-rp-view-widget": "*"

Example

<? $widget = \skeeks\cms\rpViewWidget\RpViewWidget::beginWidget('product-properties', [
    'model' => $model,
    //'visible_properties' => ['color', 'material'],
    //'visible_only_has_values' => true,
    //'viewFile' => '@app/views/your-file',
]); ?>
    <? //$widget->viewFile = '';?>
<? \skeeks\cms\rpViewWidget\RpViewWidget::end(); ?>

View file

<?php
/* @var $this yii\web\View */
/* @var $widget \skeeks\cms\rpViewWidget\RpViewWidget */
?>
<? if ($attributes = $widget->rpAttributes) :  ?>
    <? foreach ($attributes as $code => $value) :  ?>
        <p>
            <strong><?= $widget->model->relatedPropertiesModel->getRelatedProperty($code)->name; ?>:</strong>
            <?= $widget->model->relatedPropertiesModel->getSmartAttribute($code); ?>
        </p>
    <? endforeach;  ?>
<? endif;  ?>

##Links


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

About

No description, website, or topics provided.

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.