# How do I configure multiple SearchRenderers?

To configure more than one `search-renderer' you only need a few effort. The biggest effort is to create the individual renderers themselves to configure.

First of all, as already mentioned, there is more than one SearchRenderer in the to configure the desired module. What these renderers are called, whether they are Changes or are role-specific is completely irrelevant. What is important is that they have different names (IDs).

You have to create manually a FeaturePermission <feature_permissions-and-presets> for this module, which are created according to the scheme MODULNAME.renderer.RENDERERPFAD aufgebaut ist. Der Prefix MODULNAME is automatically assigned by the CoreEngine. RENDERERPFAD is the usual query path of a renderer. It is grouped by type and has any number of "subfolders". For the default SearchRenderer would be search/default and finally for the Contact Module e.g. contact.renderer.search/default.

# FeaturePermission example

<permission key="renderer.search/default">
   <admin_access>2</admin_access> <!-- also write, but value is not important -->
   <user_access>1</user_access> <!-- read only, is obligatory so that it can be applied -->
   <client_type>0</client_type>
   <value_type>0</value_type> <!-- type Varchar, can be raised to 1 = text -->
   <group></group>
   <value>["search/a", "search/b", "search/c"]</value> <!-- Default value, can be overwritten per role -->
</permission>

The value for this FeaturePermission is an array of Renderer name specified in JSON format. These names now contain the respective paths that should be present in the file system. The Renderers will then be rendered according to their restrictions and adjustments loaded especially for this user. These renderer paths must be can be specified as they are located in the file system: search/test/renderer, search/default, etc.

During the configuration of e.g. the SearchRendererPanels <components.layout.search-renderer-panel> the 'RENDERERNAME' will now as 'rendererName' parameter and the component itself provides for the FeaturePermission to be applied, the configured renderers can be loaded and displayed. The configuration of a component is no different from components that use this FeaturePermission do not apply. A RendererName is always passed and is calculated using whose one or more renderers are loaded or displayed.

In the event that there is no FeaturePermission, or the JSON is defective, or the array contains no entry, the name of the FeaturePermission is used directly as the renderer name in the filesystem, and a renderer is definitely loaded by the fallback logic. So it may there is no case in which no renderer is returned.

Request missing documentation