Hi,
I created a very minimal base plugin to get me started, but it is not working as expected.
Both on the js
and php
side I am extending the default pages section.
index.js
:
panel.plugin('owzim/custompages', {
sections: {
'custompages': {
extends: 'k-pages-section',
},
},
});
index.php
:
<?php
Kirby::plugin('owzim/custompages', [
'sections' => array(
'custompages' => require kirby()->root('kirby') . '/config/sections/pages.php',
),
]);
Some section:
sections:
custompages:
type: custompages
parent: site.find('foo')
The section is loading, I see it in the network tab as http://localhost:3000/api/site/sections/custompages
The response even working with all the data returned:
Still the section stays empty.
Also: for other regular pages section the requests include a pagination, with does noes happen with this custompages section.
http://localhost:3000/api/site/sections/someregularpages?page=1
What additional setup is necessary? Of course I would extend functionalities in the php and js file but this is simplyfied for the sake of a investigatable example.
Thanks!