Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to customize the search bar?
Good morning,
I am using Liferay community 7.4 ga103. I created
my pernsonalized search bar in html and css. I want to apply this
style to the Liferay widget "Search bar" and keep all the
search functionality of the widget. How can i do this?
(Even
creating a new portlet that does the search would work for me).
Thanks
Hello Marco,
You can create search bar freemarker widget
template, where you can use your custom mark up as per your
need and can keep OOTB search bar widget behavior.
Liferay DXP > Design > Templates > Widget Templates >
Search Bar Template (Click on plus button to see this option)
For you custom CSS you can use themeCSS client extension and can
add styles specific to your custom mark up inside themeCSS.
Reference for search bar widget: https://learn.liferay.com/w/dxp/using-search/search-pages-and-widgets/search-bar-suggestions
Reference for widget template: https://learn.liferay.com/w/dxp/site-building/displaying-content/additional-content-display-options/styling-widgets-with-widget-templates
Reference for themeCSS: https://learn.liferay.com/w/dxp/building-applications/client-extensions/frontend-client-extensions/tutorials/using-a-theme-css-client-extension
Thanks
Priyank Gajera