PHP code example of melisplatform / melis-cms-category2

1. Go to this page and download the library: Download melisplatform/melis-cms-category2 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/ */

    

melisplatform / melis-cms-category2 example snippets


/**
* Generating category display using MelisCmsCategoryDisplayCategoriesPlugin Plugin
* (hardcoded)
*/
$categoryDisplay = $this->MelisCmsCategoryDisplayCategoriesPlugin();
$categoryDisplayParameters = array(
    'template_path' => array('MelisCmsCategory2/default'),
    // Site id of News
    'site_id' => 1,
    'category_start' => 1,
);
// add generated view to children views for displaying it in the contact view
$this->view->addChild($categoryDisplay->render($categoryDisplayParameters), 'categoryDisplay');
`
 echo $this->categoryDisplay;