Urs
Urs

Reputation: 5132

TYPO3 Insert records element: detect number of items

Is there any way to detect in fluid or typoscript (or anything else) if an "Insert Records" CE from fluid_styled_content contains one or multiple items?

The use case:

I use "insert records" to display contacts from a custom extbase extension on a page, and I'd like to get a different title and layout if there are one or several items.

Upvotes: 0

Views: 514

Answers (1)

Jigal van Hemert
Jigal van Hemert

Reputation: 722

Insert Records is rendered using the RECORDS content object. In \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::render() I see no option to read the number of items or the current item number that is rendered from the contentObjectRenderer object that renders a single item.

Upvotes: 1

Related Questions