Change Classy search Template

General ShopSite user discussion

Change Classy search Template

Postby rammac13 » Mon Jul 28, 2008 1:43 pm

I am trying to change the below code so that the results of a search on my website do not show the page that the product is on. I cannot find what property to change to make this happen. So far all I have been able to do is push all the links to pages to the top of the results. I would like to completely remove the pages links altogether or at least move these links to the bottom of the results. Any Ideas? Thanks. you can go to shop-biogenesis.com and do a search to see what I mean.



<!-- START Products -->
<tr>
<td class="pa_products"><table class="pa_products">
<!-- START Search Block -->

[-- LOOP SEARCH --]
<!-- START Search Loop -->
[-- IF VAR.pr_cols "2" --]
<!-- START Two Columns -->
[-- IF SEARCHPRODUCT --]
[-- IF VAR.se_just_made "link" --]
</table></td>
</tr>
[-- END_IF --]
<tr>
<td class="se_product">
[-- END_IF --]



[-- ELSE_IF VAR.pr_cols "3" --]
<!-- START Three Columns -->
[-- IF SEARCHPRODUCT --]
[-- IF VAR.se_just_made "nothing" --]
<tr>
[-- ELSE_IF VAR.se_just_made "link" --]
</table></td>
[-- IF VAR.se_last_col "3" --]
</tr>
<tr>
[-- END_IF --]
[-- END_IF --]
<td class="se_products"><table class="se_products">
<tr>
<td class="se_product">
[-- END_IF --]

[-- IF SEARCHLINK --]
<tr>
<td class="se_link">
[-- END_IF --]

[-- ELSE_IF VAR.pr_cols "4" --]
<!-- START Four Columns -->
[-- IF SEARCHPRODUCT --]
[-- IF VAR.se_last_col "0" --]
<tr>
[-- ELSE_IF VAR.se_last_col "2" --]
</table></td>
[-- ELSE_IF VAR.se_last_col "4" --]
</table></td>
</tr>
<tr>
[-- END_IF --]
<td class="se_product">
[-- END_IF --]

[-- IF SEARCHLINK --]
[-- IF VAR.se_just_made "product" --]
<td class="se_links"><table class="se_links">
[-- END_IF --]
<tr>
<td class="se_link">
[-- END_IF --]

[-- ELSE_IF VAR.pr_cols "5" --]
<!-- START Five Columns -->
[-- IF SEARCHPRODUCT --]
[-- IF VAR.se_just_made "nothing" --]
<tr>
[-- ELSE_IF VAR.se_just_made "link" --]
</table></td>
[-- IF VAR.se_last_col "5" --]
</tr>
<tr>
[-- END_IF --]
[-- END_IF --]
<td class="se_products"><table class="se_products">
<tr>
<td class="se_product">
[-- END_IF --]

[-- IF SEARCHLINK --]
<tr>
<td class="se_link">
[-- END_IF --]

[-- ELSE --]
<!-- START One Column -->
<tr>
[-- IF SEARCHPRODUCT --]
<td class="se_product">
[-- END_IF --]



[-- END_IF --]

<!-- START Search Result -->
[-- SEARCHRESULT --]
<!-- END Search Result -->

[-- IF VAR.pr_cols "2" --]

[-- IF SEARCHPRODUCT --]
</td>
[-- VAR.se_just_made "product" --]
[-- END_IF --]

[-- IF SEARCHLINK --]
</td>
</tr>
[-- VAR.se_just_made "link" --]
[-- END_IF --]
<!-- END Two Columns -->

[-- ELSE_IF VAR.pr_cols "3" --]

[-- IF SEARCHPRODUCT --]
</td>
</tr>
[-- IF VAR.se_last_col "3" --]
[-- VAR.se_last_col "1" --]
[-- ELSE --]
[-- VAR.se_last_col INC --]
[-- END_IF --]
[-- VAR.se_just_made "product" --]
[-- END_IF --]

[-- IF SEARCHLINK --]
</td>
</tr>
[-- VAR.se_just_made "link" --]
[-- END_IF --]
<!-- END Three Columns -->

[-- ELSE_IF VAR.pr_cols "4" --]

[-- IF SEARCHPRODUCT --]
</td>
[-- IF VAR.se_last_col "4" --]
[-- VAR.se_last_col "1" --]
[-- ELSE --]
[-- VAR.se_last_col INC --]
[-- END_IF --]
[-- VAR.se_just_made "product" --]
[-- END_IF --]

[-- IF SEARCHLINK --]
</td>
</tr>
[-- IF VAR.se_just_made "product" --]
[-- VAR.se_last_col INC --]
[-- END_IF --]
[-- VAR.se_just_made "link" --]
[-- END_IF --]
<!-- END Four Columns -->

[-- ELSE_IF VAR.pr_cols "5" --]
[-- IF SEARCHPRODUCT --]
</td>
</tr>
[-- IF VAR.se_last_col "5" --]
[-- VAR.se_last_col "1" --]
[-- ELSE --]
[-- VAR.se_last_col INC --]
[-- END_IF --]
[-- VAR.se_just_made "product" --]
[-- END_IF --]

[-- IF SEARCHLINK --]
</td>
</tr>
[-- VAR.se_just_made "link" --]
[-- END_IF --]
<!-- END Five Columns -->

[-- ELSE --]
</td>
</tr>
<!-- END One Column -->
[-- END_IF --]

[-- VAR.pa_search_result "true" --]
<!-- END Search Loop -->
[-- END_LOOP SEARCH --]

[-- IF VAR.pr_cols "2" --]
[-- IF VAR.se_just_made "link" --]
</table></td>
</tr>
[-- ELSE_IF VAR.se_just_made "product" --]
<td class="se_blank">&nbsp;</td>
</tr>
[-- ELSE --]
<!-- Do Nothing! -->
[-- END_IF --]
[-- ELSE_IF VAR.pr_cols "3" --]
</table></td>
[-- IF VAR.se_last_col "3" --]
</tr>
[-- ELSE_IF VAR.se_last_col "2" --]
<td class="se_blank">&nbsp;</td>
</tr>
[-- ELSE_IF VAR.se_last_col "1" --]
<td colspan="2" class="se_blank">&nbsp;</td>
</tr>
[-- ELSE --]
<!-- Do Nothing! -->
[-- END_IF --]
[-- ELSE_IF VAR.pr_cols "4" --]
[-- IF VAR.se_last_col "4" --]
</table></td>
</tr>
[-- ELSE_IF VAR.se_last_col "3" --]
<td class="se_blank">&nbsp;</td>
</tr>
[-- ELSE_IF VAR.se_last_col "2" --]
</table></td>
<td colspan="2" class="se_blank">&nbsp;</td>
</tr>
[-- ELSE_IF VAR.se_last_col "1" --]
<td colspan="3" class="se_blank">&nbsp;</td>
</tr>
[-- ELSE --]
<!-- Do Nothing! -->
[-- END_IF --]
[-- ELSE_IF VAR.pr_cols "5" --]
</table></td>
[-- IF VAR.se_last_col "5" --]
</tr>
[-- ELSE_IF VAR.se_last_col "4" --]
<td class="se_blank">&nbsp;</td>
</tr>
[-- ELSE_IF VAR.se_last_col "3" --]
<td colspan="2" class="se_blank">&nbsp;</td>
</tr>
[-- ELSE_IF VAR.se_last_col "2" --]
<td colspan="3" class="se_blank">&nbsp;</td>
</tr>
[-- ELSE_IF VAR.se_last_col "1" --]
<td colspan="4" class="se_blank">&nbsp;</td>
</tr>
[-- ELSE --]
<!-- Do Nothing! -->
[-- END_IF --]
[-- ELSE --]
<tr>
<td class="se_blank">&nbsp;</td>
</tr>
[-- END_IF --]

[-- IF VAR.pa_search_result "false" --]
<!-- START No Search Results -->
<tr>
<td class="se_no_result">[-- STORE.88 --] [-- SEARCHSTRING --]</td>
</tr>
<!-- END No Search Results -->
[-- END_IF --]

<!-- END Search Block -->
</table></td>
</tr>
<!-- END Products -->
rammac13
 
Posts: 35
Joined: Thu Oct 18, 2007 10:30 am
Location: Oregon

Postby Jim » Mon Jul 28, 2008 2:33 pm

The link that is generated depends on the page template or Link Template Override: value set under Preferences > Search Settings >Search Layout. If you don't want a link to display simply edit the [-- DEFINE LINK_TO_PAGE --] section of the appropriate template and make it so that it doesn't output any text for the link.

The product template might also have a section that displays the More information page link so you might want to edit that template and remove the code that display the moreinfo link.

I believe that if you have the search destination set to use the product more information page that the link is output using the generic link to the moreinformation page and it can't be changed. So the solution there is to not set the search destination for the product to the more information page.

Another option would be to set up a check to see if the search result is a product or a link and if a link just don't output the search result. Here is a really simplified version

Code: Select all
[-- LOOP SEARCH --]

[-- IF SEARCHPRODUCT --]
output the product
[-- SEARCHRESULT --]
[-- ELSE --]
don't do any output
[-- END_IF --]
[-- END_LOOP SEARCH --]

Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 141 guests

cron