Hi all
We have implemented a drop down for visitors to search by sections or departments on the following client's site:
www.stitch1knit1.com
The search box and drop down appears on every page by virtue of having included the code for the search function into the primary template (this site uses several primary templates for the different departments).
The following gives an example of some of the HTML that generates the drop-down:
<SELECT NAME="SX">
<OPTION VALUE="0">All Sections<OPTION VALUE='1'>Needlework
<OPTION VALUE='1768'>Knitting
<OPTION VALUE='1838'>Rug Making
<OPTION VALUE='1896'>Accessories</SELECT>
The above "values" were obtained from the Actinic generated search.html page which resides on the site (although we don't link to it as we do not intend for visitors to use this page).
The Actinic generated search.html page includes all of the sections (of which there are hundreds).
In the drop-down that we have put in the overall primary template we have cut this list down to the four top-level departments using the values that were generated in search.html.
However. the problem with this is that whenever the site has a new section added or removed, the values assigned to the top-level sections change. And unless we change the values used in the drop-down in the overall templates, the "search by department" no longer actually searches the correct section.
Our client really does not want to have to modify the overall templates everytime that they add or delete a section.
Any suggestions anyone?
Cheers
Nick
We have implemented a drop down for visitors to search by sections or departments on the following client's site:
www.stitch1knit1.com
The search box and drop down appears on every page by virtue of having included the code for the search function into the primary template (this site uses several primary templates for the different departments).
The following gives an example of some of the HTML that generates the drop-down:
<SELECT NAME="SX">
<OPTION VALUE="0">All Sections<OPTION VALUE='1'>Needlework
<OPTION VALUE='1768'>Knitting
<OPTION VALUE='1838'>Rug Making
<OPTION VALUE='1896'>Accessories</SELECT>
The above "values" were obtained from the Actinic generated search.html page which resides on the site (although we don't link to it as we do not intend for visitors to use this page).
The Actinic generated search.html page includes all of the sections (of which there are hundreds).
In the drop-down that we have put in the overall primary template we have cut this list down to the four top-level departments using the values that were generated in search.html.
However. the problem with this is that whenever the site has a new section added or removed, the values assigned to the top-level sections change. And unless we change the values used in the drop-down in the overall templates, the "search by department" no longer actually searches the correct section.
Our client really does not want to have to modify the overall templates everytime that they add or delete a section.
Any suggestions anyone?
Cheers
Nick
Comment