I tried to get and limit the number of pages in panel section.
In my blueprint, I get my pages with parent: site.find('posts') and it works well but if I add limit() or filterBy() like this parent: site.find('posts').limit(10) I’ve got the error Undefined property: Kirby\Cms\Field::$data
No, the syntax doesn’t make sense, because that’s not a collection but a page. The syntax is like in your template, to use limit, you would use
$site->find('posts')->children()->limit(10)
But the parent option wants a page, not a collection.
You can use the limit option to display only x items per pagination “page”, but you will get the pagination underneath. But if you really only display 10 items but there are more, you won’t be able to access the other pages anymore unless you know the direct link, so that’s probably not such a good idea, anyway? But I don’t know your use case.
Note that you can’t add pages when using the plugin, that may or may not be what you want…
That’s by the way the reason why filtering was removed from sections for the time being, because it can easily lead to pages being created by afterwards being inaccessible.