Custom Search Template

Questions and answers about ShopSite Custom Templates

Custom Search Template

Postby BRITANUCK » Thu Aug 04, 2011 12:38 pm

Hi Guys!

ok, I have my custom search template looking and appearing the way i want it. It is functioning as far as searching and displaying those results is concerned. My issue is its listing all 50 results(per page) in one single lenthy column within the table for the results, i want it to display 3 columns and i have selected 3 colums within my search page setting in the Back Office, but its refusing to display 3 columns only 1.

Any idea why? Is this once again some silly and small that i have missed? :)

Here is my code for my custom template
Code: Select all
[-- DEFINE SEARCH_RESULTS --]
<html>
<head>
<title>[-- PAGE.Title --]</title>
<meta name="keywords" content="[-- PAGE.MetaKeywords --]">
<meta name="description" content="[-- PAGE.MetaDescription --]">

[-- INCLUDE all_pages_header --]

</head>
   
<body>
<div id="wholepagewrap">
<div id="mainwrap">[-- HEADER --]</div>
<div id="centralspacewrap">
  <table width="938" align="center" cellpadding="0" cellspacing="0">
      <tr>
      <td colspan="3" class="breadcrumbs">&nbsp;</td>
    </tr>
    <tr><td>&nbsp;</td>
    </tr>
      <tr>
        <td colspan="3" valign="top" class="mainh1header"><h1>[-- PAGE.Name --]</h1></td>
      </tr>
       <tr>
      <td colspan="3" valign="top"><table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top"><table width="180" cellspacing="0" cellpadding="0"><tr><td>[-- INCLUDE sidebarnavigation --]</td></tr></table></td>
          <td valign="top" class="menudivide">&nbsp;</td>
          <td valign="top" ><table width="744" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="3">[-- IF SEARCHTOP --][-- SEARCHRESULT_FORM --][-- END_IF --]</td>
              </tr>
            <tr>
              <td colspan="3">&nbsp;</td>
            </tr>
           
            <tr>
              <td colspan="3"><div id="search_results_header"><h3>[--Store.SearchResults --]:&nbsp;&nbsp;<span class="result">[-- SearchString --]</span></h3></div></td>
            </tr>
            <tr>
              <td colspan="3">&nbsp;</td>
            </tr>
           
            <tr>
              <td colspan="3"><table width="744" border="0" cellpadding="0" cellspacing="0">
          


[-- LOOP SEARCH PAGE.Columns --]<tr>

    <td valign="top" align="left">[-- SEARCHRESULT --]</td>


</tr>[-- END_LOOP SEARCH--]

   
</table></td>
              </tr>
           
            <tr>
              <td colspan="3">&nbsp;</td>
              </tr>
            <tr>
              <td colspan="3">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="3">[-- IF SEARCHBOTTOM --][-- SEARCHRESULT_FORM --][-- END_IF --]</td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
       <tr>
      <td colspan="3" valign="top">&nbsp;</td>
    </tr>
  </table>
</div>
<div id="footerwrap">[-- FOOTER --]</div>
</div>


</body>
</html>
[-- END_DEFINE SEARCH_RESULTS --]
BRITANUCK
 
Posts: 32
Joined: Wed Dec 05, 2007 10:47 am

Re: Custom Search Template

Postby ShopSite Lauren » Thu Aug 04, 2011 1:17 pm

Displaying columns in a search result page is difficult because the search results are both products and links to those pages that the product appears in. For example, if you have a product assigned to 3 pages, then the default search results (there are other settings that can change this) will have 4 search results for that product, the first being the product itself and the other 3 being the page links that the product is assigned to.

To implement search results in columns I would suggest either making a copy of the Flex-Build search template and Flex-Build search result (both link for the page and product template) and modifying those. The Flex-Build search result template (i believe) is the only built in template that uses the search result column feature. Or you can use the Cookbook page below to see a work-a-round for search result columns.
http://www.shopsite.com/templates/cookbook/search-columns.shtml
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 887
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Custom Search Template

Postby BRITANUCK » Fri Aug 05, 2011 7:44 am

Thank you Lauren!


The cookbook recommendation was exactly what i was after and after implementing it and changing the "make search page" section of my products i now have my desired 3 column layout. :)

I can recommend this to anyone else with this same problem. Problem is resolved.

Thanks again.

BRIT
BRITANUCK
 
Posts: 32
Joined: Wed Dec 05, 2007 10:47 am


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 11 guests