Jump to content

Foundation Advanced Search, plus an errant link issue


Recommended Posts

It looks like the Advance Search page is there i Foundation, based on content.search.php - but what is the url for it? I'd like to add the link to it. Also, I have a stray link on the Search Results page that I cannot for the life of me find the source of. There is a link to our Security-Privacy page there, right above the Sort By choices that I need to get rid of.

Link to comment
Share on other sites

I asked about the (apparently missing) link to the Main/Advanced Search page about a month or two ago.

You can try /search.html

You would need include with your post the first 20 lines of actual code from your copy of the template content.category.php. (Search results are treated as a category.)

Link to comment
Share on other sites

Maybe getting Smarty to show it's {debug} output may shed some light.

Sorry, is this to find the errant code? I put [debug} on the content.category.php AND box.search.php, but I don't know what to do with it now that I see it. lol

Edited by Dirty Butter
Link to comment
Share on other sites

Do whatever you do to edit a file. Edit the template content.category.php, Copy the first 40 lines of the file to your reply to this conversation. But before you submit, delete the top lines that are just comments - no need to see that.

Link to comment
Share on other sites

content.category.php

<h2>{$category.cat_name}</h2>
{* OMIT CATEGORY IMAGE {if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if} END OMIT CATEGORY IMAGE *}
{* SEMPER FI DOCUMENT MENU FOR SMALL *}
{if isset($DOCUMENTS_CATEGORY) && count($DOCUMENTS_CATEGORY) > 0}
<div class="row" style="margin-bottom: 10px;">
  <div class="small-12 columns">
    {foreach from=$DOCUMENTS_CATEGORY item=document}
      <a href="{$document.doc_url}" title="{$document.doc_name}" {if $document.doc_url_openin}target="_blank"{/if}>{$document.doc_name}</a><br />
    {/foreach}
  </div>
  {* END SEMPER FI DOCUMENT MENU FOR SMALL *}
</div>
{/if}
{if !empty($category.cat_desc)}
<div class="row">
   <div class="small-12 columns">{$category.cat_desc}</div>
</div>
{/if}
{if isset($SUBCATS) && $SUBCATS}
<ul class="medium-block-grid-6 text-center show-for-medium-up" data-equalizer>
   {foreach from=$SUBCATS item=subcat}
   <li data-equalizer-watch>
      <a href="{$subcat.url}" title="{$subcat.cat_name}">
      <img class="th" src="{$subcat.cat_image}" alt="{$subcat.cat_name}">
      </a>
<br>
      <a href="{$subcat.url}" title="{$subcat.cat_name}"><small>{$subcat.cat_name}</small></a>
   </li>
   {/foreach}
</ul>
{/if}
{if $PRODUCTS}
<div class="row">
   <div class="small-12 medium-8 columns">
      {if isset($SORTING)}
      <form action="{$VAL_SELF}" class="autosubmit" method="post">
         <div class="row">
            <div class="small-3 medium-2 columns">
               <label for="product_sort">{$LANG.form.sort_by}</label>
            </div>
            <div class="small-9 medium-5 columns left">
               <select name="sort" id="product_sort">
                  <option value="" disabled>{$LANG.form.please_select}</option>
                  {foreach from=$SORTING item=sort}
                  <option value="{$sort.field}|{$sort.order}" {$sort.selected}>{$sort.name} ({$sort.direction})</option>
                  {/foreach}
               </select>
               <input type="submit" value="{$LANG.form.sort}" class="hide">
            </div>
         </div>
      </form>
      {/if}
   </div>

 

 

Link to comment
Share on other sites

This:

{* SEMPER FI DOCUMENT MENU FOR SMALL *}
{if isset($DOCUMENTS_CATEGORY) && count($DOCUMENTS_CATEGORY) > 0}
<div class="row" style="margin-bottom: 10px;">
  <div class="small-12 columns">
    {foreach from=$DOCUMENTS_CATEGORY item=document}
      <a href="{$document.doc_url}" title="{$document.doc_name}" {if $document.doc_url_openin}target="_blank"{/if}>{$document.doc_name}</a><br />
    {/foreach}
  </div>
  {* END SEMPER FI DOCUMENT MENU FOR SMALL *}

is what is showing the document link.

It is a mod to show SiteDocs elsewhere on the page.

The Smarty console says {$DOCUMENTS_CATEGORY} has one element, the Security document, and is flagged to show where:

    doc_header_status => "1"
    doc_footer_status => "1"
    doc_sidebox01_status => "1"
    doc_sidebox02_status => "0"
    doc_access => "0"
    doc_product_assign => ""
    doc_category_assign => ""

So, I think somewhere else (a plugin hook?) is misidentifying the Search Results category as a valid location to add these documents.

Or maybe you unintentionally copied over a skin edit from a prior skin?

If intentional, then, if you want the skin to show this only for small viewports, I guess:

Was:
<div class="row" style="margin-bottom: 10px;">
Now:
<div class="row show-for-small-only" style="margin-bottom: 10px;">

 

Link to comment
Share on other sites

THANK YOU!! I'll work on this tomorrow when I'm fresh, but at least I know where to look. That SHOULD have occurred to me, but it didn't. As for the Advanced Search, I tried changing checkbox to radio in content.search.php,. It did not work for me.

{if isset($MANUFACTURERS)}
   <div class="row">
      <div class="small-8 columns">
         <label for="">{$LANG.catalogue.manufacturer}</label>
      </div>
   </div>
   <div class="row">
      <div class="small-12 columns">
         <ul class="small-block-grid-5">
            {foreach from=$MANUFACTURERS item=manufacturer}
            <li><input type="radio" value="{$manufacturer.id}" id="manufacturer_{$manufacturer.id}" name="search[manufacturer][]" {$manufacturer.selected}><label for="manufacturer_{$manufacturer.id}">{$manufacturer.name}</label></li>
            {/foreach}
         </ul>
      </div>
   </div>
   {/if}

 

Link to comment
Share on other sites

Check Boxes and Radio Buttons are not Select drop-down selectors. Try:

      <div class="small-12 columns">
         {* <ul class="small-block-grid-5"> *}
         <select name="search[manufacturer][]">
            {foreach from=$MANUFACTURERS item=manufacturer}
            <option value="{$manufacturer.id}">{$manufacturer.name}</select>
            {* <li><input type="radio" value="{$manufacturer.id}" id="manufacturer_{$manufacturer.id}" name="search[manufacturer][]" {$manufacturer.selected}><label for="manufacturer_{$manufacturer.id}">{$manufacturer.name}</label></li> *}
            {/foreach}
         </select>
         {* </ul> *}
      </div>

I made template comments of the existing statements that are not appropriate.

Link to comment
Share on other sites

Thank you. I did tweak it a bit, but this is working for me:

<div class="small-12 columns">
                <select name="search[manufacturer][]">
			<option value="">{$LANG.common.please_select}</option>
            {foreach from=$MANUFACTURERS item=manufacturer}
            <option value="{$manufacturer.id}">{$manufacturer.name}</option>
            {/foreach}
         </select>
        </div>

I'm not particularly satisfied with the way my Advanced Search link looks on the Header, however. I never could get it to come right underneath the search box (without a line space). So for now I made the search box shorter and put the Advanced Link next to it.

Edited by Dirty Butter
option value was not closed - now corrected
Link to comment
Share on other sites

I couldn't find anything I had done to the SemperFi Document Manager mod that caused the errant link, so I wrote Daren this morning. He's modified the code and fixed it already (great Customer Service is why I use him so much). I appreciate your help in pinpointing the problem, Bsmither.

Any suggestions about improving the look/location of the Advanced Search link?

Link to comment
Share on other sites

It may or may not be intuitive to a large percentage of non-web-savvy visitors, but I prefer that when I click the search icon without having entered any search terms, I be taken to the Advanced search page.

Right now, without entering any terms in the box, and clicking the search tool icon, I get a results page of Products found matching ''.

I think a Github Feature Request is in order.

Something like when the search field is empty, the "tooltip" for the icon says Advanced Search. But when there is something in the search field, the tooltip says View Results.

On a different note, if you can figure out how to get an instantaneous draw-update on the flyout action of the side menu, that would be great. I thought, at first, my computer had become glacially slow.

Link to comment
Share on other sites

On a different note, if you can figure out how to get an instantaneous draw-update on the flyout action of the side menu, that would be great. I thought, at first, my computer had become glacially slow.

I'll pass this along to SemperFi.

As for clicking in the empty Search box to go to the Advanced Search - I don't think I have ever done that on any site - wasn't intuitive to me. The hint would have to be there - is a tooltip the same thing as a placeholder?

Link to comment
Share on other sites

A tooltip is what's called when you hover over a link or a tool icon and a small yellow box pops up nearby.

On the editor buttons at the top edge of this editor window, hover the mouse cursor. You will get a tooltip with the name of the tool.

But any kind of thing that behaves similarly is called a tooltip.

But you mention 'placeholder'. That would work. Have it say something like: Quick Search - Enter Terms, Advanced Search - Click Here >>>>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...