Developer forum

Forum » Templates » Problem rendering SearchBox

Problem rendering SearchBox

Per Ljung
Reply
Hi!

I have template called menu.html.xslt where I render some fixed menu items. I also want to render the searchbox.

I have added

xsl:value-of select="Ecom.Search.SearchBox" and added the product catalog module to the paragraph and checked the search option in the module settings. But the search form won't show up.

I have also tried with
<![CDATA[<!--@Ecom:Search.SearchBox-->]]

But that didn't work either.

What can be wrong?
Best regards,
Per

Replies

 
Vladimir
Reply
Hi Per!
This should works:
<xsl:template match="*">
<div class="search">
    <xsl:value-of disable-output-escaping="yes" select="Ecom.Search.SearchBox" />
  </div>
...

And when you checked the search option, you also should select template for the search form.
For example:
<form name="EcomSearch" method="get">
     <input type="hidden" name="ID" value="<!--@Ecom:Search:Page.ID-->">
     <input type="text" name="eComQuery" value="<!--@Ecom:Search.Query-->">
     <input type="submit" value="Search">
</form>

Best regards,
Vladimir


 

You must be logged in to post in the forum