.. include:: /Includes.rst.txt .. _editor: =========== For Editors =========== .. contents:: :local: :depth: 2 The extension provides two content elements, both available in the **Special Elements** group of the TYPO3 content element wizard. .. note:: Both widgets are only visible on the frontend when the administrator has enabled **Load Scripts** in :guilabel:`Site > Rek.ai` and provided a valid Script URL. If neither condition is met, the content elements render nothing. .. _editor-recommendations: The "Rek.ai Recommendations" Content Element ============================================= The **Rek.ai Recommendations** content element (internal CType: ``rekai_recommendations``) renders a personalised content recommendations widget. Add it to any page column using the standard TYPO3 content element wizard. .. _editor-recommendations-tabs: Content Element Tabs -------------------- .. _editor-tab-general: General (tab) ^^^^^^^^^^^^^ The standard TYPO3 general tab. The **Header** field (if shown) is part of the default TYPO3 header palette and is independent of the Rek.ai widget header described below. .. _editor-tab-display: Display (tab) ^^^^^^^^^^^^^ .. figure:: /Images/ContentElementDisplay.png :alt: The Display tab of the Rek.ai Recommendations content element :class: with-shadow Display settings for the recommendations widget. .. rst-class:: dl-parameters Show Header Toggle (on by default). When enabled, the widget displays a header above the recommendations list. Header Text *(only visible when Show Header is on)* The text displayed as a header above the recommendations. Defaults to ``Discover more``. Number of Hits How many recommendation links the widget should display. Accepts a value between **1** and **20**. Default: **5**. Hit Title Max Length Maximum number of characters rendered for each recommendation link title. Accepts a value between **1** and **99**. Default: **20**. Maps to the ``data-titlemaxlength`` attribute. Render Style Controls the visual layout of the recommendations: Pills Displays recommendations as pill-shaped badges (default). List Displays recommendations as a multi-column list. The number of columns is controlled by **Number of Columns** (see below). Advanced Uses Rek.ai's advanced rendering mode. Refer to the Rek.ai documentation for details. Number of Columns *(only visible when Render Style is set to* **List** *)* Number of columns in the list layout. Accepts a value between **1** and **6**. Default: **2**. .. _editor-tab-source: Recommendation Source (tab) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ These settings control which pages Rek.ai considers as recommendation candidates. .. rst-class:: dl-parameters Recommendation Source Defines the scope of pages passed to Rek.ai: Current page *(default)* No explicit root path is set; Rek.ai uses its own default scope. Use only subpages of the current page Limits recommendations to the direct or indirect children of the current page (``data-userootpath="true"``). Use subpages from a specific level Limits recommendations to subpages starting from a specific page tree level (``data-userootpath="true"`` + ``data-rootpathlevel``). The **Root Path Level** and **Select Subtree Pages** fields appear when this option is selected. Root Path Level *(only visible when* **Recommendation Source** *is set to* **Use subpages from a specific level** *)* The tree level (1–10) from which subpages are used as the recommendation pool. Select Subtree Pages *(only visible when* **Recommendation Source** *is set to* **Use subpages from a specific level** *)* Optional multi-page selector. When pages are selected, their URL slugs are passed to Rek.ai as a ``data-subtree`` attribute (comma-separated), further narrowing the subtree scope. Exclude child nodes of the starting point When enabled, only the pages directly at the root path level are included; their children are excluded. .. _editor-tab-advanced: Advanced (tab) ^^^^^^^^^^^^^^ .. rst-class:: dl-parameters Extra Attributes Arbitrary HTML data attributes added verbatim to the ``