1. Go to this page and download the library: Download microman/kirby-components 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/ */
microman / kirby-components example snippets
component('my_component');
component('my_component', $page, ['title' => 'This is a different title.']);
$page->my_field()->toComponent();
$page->my_field()->toComponent(['new_value' => 'My new value']);
$content->field_in_component();
$page->my_field()->toComponent();
$page->my_field()->toComponent(['my_component_field' => 'My existing or new value']);
$page->my_field()->toComponent($page->any_section());
html
foreach ($page->my_field()->toComponents() as $component):
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.