PHP code example of gearmagicru / gm-wd-article

1. Go to this page and download the library: Download gearmagicru/gm-wd-article 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/ */

    

gearmagicru / gm-wd-article example snippets


$articles = Gm::$app->widgets->get(
    'gm.wd.article', 
    [
        'showHeader' => false, 
        'viewFile' => '/articles/default.phtml'
    ]
);
$articles->run();

echo $this->widget(
    'gm.wd.article', [
    [
        'showHeader' => false, 
        'viewFile' => '/articles/default.phtml'
    ]
]);

use Gm\Widget\Article\Widget as Article;
echo Article::widget(
    'gm.wd.article', [
    [
        'showHeader' => false, 
        'viewFile' => '/articles/default.phtml'
    ]
);