feat: add geoformat page model with coverFiles method
Expose combined files (page files + map children files) for the cover field query in the geoformat blueprint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9482dfa08c
commit
c5cc94bf5d
1 changed files with 13 additions and 0 deletions
13
public/site/models/geoformat.php
Normal file
13
public/site/models/geoformat.php
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Kirby\Cms\Page;
|
||||||
|
|
||||||
|
class GeoformatPage extends Page
|
||||||
|
{
|
||||||
|
public function coverFiles()
|
||||||
|
{
|
||||||
|
return $this->files()->add(
|
||||||
|
$this->children()->filterBy('intendedTemplate', 'map')->files()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue