sylvainjule / kirby-pagetable

Display subpages in a flexible table section. Kirby 3 only.
MIT License
113 stars 11 forks source link

Display the value of 2+ fields as text in a column #45

Closed sylvainjule closed 5 years ago

sylvainjule commented 5 years ago
# site/blueprints/*.yml
...
  columns:
    example:
      text: '{{ page.checkboxesValues }}'
Kirby::plugin('my/page-methods', [
    'pageMethods' => [
        'checkboxesValues' => function () {
            $first       = $this->first()->value();
            $second = $this->second()->value();
            // ...
            // do something with $first and $second if needed
            return $first . ' ' . $second;
        }
    ]
]);