Hide search results when request is empty, based on portlet settings
authorThierry Florac <thierry.florac@onf.fr>
Mon, 07 Jan 2019 11:23:20 +0100
changeset 348 4a12ea68651e
parent 347 b6b9e744b9ca
child 349 41fc347d865b
Hide search results when request is empty, based on portlet settings
src/pyams_default_theme/features/search/portlet/templates/search-results.pt
--- a/src/pyams_default_theme/features/search/portlet/templates/search-results.pt	Mon Jan 07 10:20:11 2019 +0100
+++ b/src/pyams_default_theme/features/search/portlet/templates/search-results.pt	Mon Jan 07 11:23:20 2019 +0100
@@ -1,5 +1,6 @@
 <div tal:define="settings view.settings;
 				 renderer_settings view.renderer_settings;"
+	 tal:condition="settings.allow_empty_query or request.params.get('user_search','').strip()"
 	 i18n:domain="pyams_default_theme">
 	<h2>${i18n:settings.title}</h2>
 	<form action="${tales:absolute_url(context)}"