PHP code example of floor12 / yii2-single-content

1. Go to this page and download the library: Download floor12/yii2-single-content library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

floor12 / yii2-single-content example snippets


'modules' => [
      'single_content' => [
        'class' => 'floor12\single_content\Module',
        'administratorRoleName' => '@',
    ],
],

    echo SingleContentItemWidget::widget(['id' => 'example-landing-block-001']);
    echo SingleContentItemWidget::widget(['id' => 'one-more-block']);