PHP code example of jg / kirby-wrappers

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

    

jg / kirby-wrappers example snippets


return [
  'jg.wrappers' => ['columns']
];

return [
  'jg.wrappers' => [
    'center', // ← simplest
    [
      'wrapper' => 'gallery',
      'class' => 'image-gallery',
    ],
    [
      'wrapper' => 'card',
      'tag' => 'article',
    ],
    [
      'wrapper' => 'toggle',
      'attributes' => [
        'data-component' => 'toggle'
      ]
    ],
    [
      'wrapper' => 'modal',
      'class' => false // ← pass false to disable class
      'attributes' => [
        'data-component' => 'modal'
      ]
    ]
  ]
];