Processor RenderedItem: add search_api_processor ID the temporary user

Created on 30 June 2025, 3 days ago

Problem/Motivation

For the Search API Exclude - Layout Builder module, we needed a way to know when RenderedItem processor is the cause of Layout Builder components being rendered, so we can intercept and alter the Layout Builder render result.

We played around with various solutions, using existing options (dedicated role for example).
The solution we ended up with, is added a custom value to the temporary user session that is created in the RenderedItem, as it seemed least intrusive and no additional config is needed.
Additionally, it allows other modules to inspect the current user session and detected if we are rendering for indexing or not.

Proposed resolution

Add custom value 'search_api_processor' with value 'rendered_item' to the UserSession that is created to render content for indexing.

Or something similarly unique, that can be detected and acted upon by other modules.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium andreasderijcke Antwerpen / Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024