The search for content in Plone6/Volto seems to function similarly to the old Plone. But how do I display only the second to fourth search hits, for example?
So far I do my search like this:
searchContent(content.id, {
portal_type: ['News Item'],
review_state: 'published',
sort_on: 'effective',
b_size: 3,
fullobjects: true,
}),
In the old Plone I would have solved it like this:
<tal:suche tal:define="results python:here.portal_catalog.searchResults(
portal_type=('News Item'),
sort_on='effective',
review_state=['published'])[1:3];">
Is there a documentation for the searchContent in Plone?
When I search with searchContent I can query all elements of an object. Even those that have been added by dexterity. It simply works like this:
item.preline
But when I search for items with the listing in Volto, I can't get to the new elements. Here item.preline is empty. In the old Plone I would have done it like this
item_object item/getObject;
item_preline item_object/preline|nothing;