Customising Sitefinity 5.0 Search Box
Hi,
I have recently gone through the process of migrating our Sitefinity 3.7 site to Sitefinity 5.0. I am now in the process of going through the site "tidying up". On our original site we had a full site search. The actual search field had been customised using our own template added through the "layouttemplatepath" in the advanced menu of the control. However, in the new site it appears that the advanced menu no longer exits for the search control.
I am aware that I can still customise the results layout using a template, but would like to know where to apply a template to customise the search field.
Thanks.
Hi alex, the search box can indeed be templated. Unfortunately the layout template path is not exposed (I believe this is logged for fixing, I'll double check)
However, there is a workaround, which is the ViewMap. This feature allows you to globally map a control to a template.
Take a look at these posts, the first walks through using the viewmap, the second shows an example of mapping the searchbox. keep in mind this will globally map the template so all instances of your search box will use this template
Customizing Sitefinity Controls with the ViewMap
5 Things: Useful Examples of the Sitefinity ViewMap
hope this is helpful!
Hi SelAromDotNet,
Thank you for your reply. I hadn't even thought about taking that approach, it was just what I needed!
Thanks again,
Alex.