PHP code example of medienbaecker / kirby-modules

1. Go to this page and download the library: Download medienbaecker/kirby-modules 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/ */

    

medienbaecker / kirby-modules example snippets


<?= $page->modules() 

<div class="<?= $module->moduleId() 

return [
  'medienbaecker.modules.default' => 'gallery' // default: 'text'
];

return [
  'medienbaecker.modules.exclude' => [
    'hero',
    'anotherForbiddenModule'
  ]
];

return [
  'medienbaecker.modules.autoslug' => true
];

return [
  'medienbaecker.modules.autopublish' => true
];

return [
  'medienbaecker.modules.redirect' => true
];

// site/config/config.php

return [
  'medienbaecker.modules.model' => 'CustomModulePage'
];

// site/models/module.php

class CustomModulePage extends ModulePage {
  // methods...
}