Default theme implementation for displaying a single search result.
This template renders a single search result. The list of results is rendered using '#theme' => 'item_list', with suggestions of:
Available variables:
@todo The info variable needs to be made drillable and each of these sub items should instead be within info and renamed info.foo, info.bar, etc.
Other variables:
Since info_split is keyed, a direct print of the item is possible. This array does not apply to user searches so it is recommended to check for its existence before printing. The default keys of 'type', 'user' and 'date' always exist for node searches. Modules may provide other data.
{% if (info_split.comment) %} <span class="info-comment"> {{ info_split.comment }} span> {% endif %}
To check for all available data within info_split, use the code below.
<pre> {{ dump(info_split) }} pre>
template_preprocess_search_result()
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!search!templates!search-result.html.twig/8.1.x