PHP code example of microman / kirby-components-example

1. Go to this page and download the library: Download microman/kirby-components-example 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 example snippets



return [
    'microman.components.root' => "site/my_location"
];
html
<h1 class="h-full pt-8 pl-8 text-2xl">Our Team</h1>
<div class="flex flex-wrap p-5 cards column">
     foreach ($site->pages()->template('team') as $team): 
html
<?= snippet('blocks/formcore/styles') 
html
<div class="flex flex-wrap p-5">
     foreach ($content->card_content()->toComponents() as $source): 
html
 
    if ($content->source()->value() === "manual") {
        $sources = $content->card_content()->toComponents();
    } 
    if ($content->source()->value() === "pages") {
        $sources = $content->pages()->toPages();
    }
    $sources ??= [];