- Issue created by @sandip27
- Status changed to RTBC
12 months ago 11:27am 26 December 2023 - Status changed to Downport
12 months ago 7:43am 30 December 2023 - 🇵🇪Peru jcarhuazv
Thanks @sandip27 for that patch. I'm new to this forum so I hope to contribute correctly.
For the results list to look correctly it is also necessary to change 'item.value' to 'item' in the results template custom-search-results.html.twig.index a2335c8e..81df7bf0 100644 --- a/modules/contrib/custom_search/templates/custom-search-results.html.twig +++ b/modules/contrib/custom_search/templates/custom-search-results.html.twig @@ -31,7 +31,7 @@ {%- endif -%} <{{ list_type }}{{ attributes }}> {%- for item in items -%} - <li{{ item.attributes }}>{{ item.value }}</li> + <li{{ item.attributes }}>{{ item }}</li> {%- endfor -%} </{{ list_type }}> {%- if filter_position=='below' -%}
Regards.
- 🇮🇳India amittgaur Chandigarh
Hi,
Here is the another way to fix this if you are getting the same error in your search result.
in
custom_search/templates/custom-search-results.html.twig.
Replace
<li{{ item.attributes }}>{{ item.value }}</li>
with
<li{{ item.attributes }}>{{ item|slice(0, 2) }}</li>
Hope this help!
Thank you.