View Single Post
  #7  
Old January 8th, 2011, 06:27 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by badm00n View Post
Sorry that last part probably wasn't clear. Here is the code from this thread i was using?

/showthread.php?t=697
OK, here's one method. I might post a simpler solution if I can work that out:
  1. Log into the Factory
  2. Go to Views > Custom Views > Add a new view
  3. Name the view "Search Form" and check the "Don't use layout for this view" checkbox
  4. Add a "text" widget to the module area.
  5. Click the template icon and add the code below (same code that can be found in your Widgets > Simple Search view):
    Code:
    <script type="text/javascript">
    <!--
    /*
     * NOTE: This JS code would be much better off
     * existing in your theme's header.php file.
    */
    function wash( anInput ) { if(anInput.value == anInput.defaultValue) anInput.value = ''; }
    function checkWash( anInput ) { if(anInput.value == '') anInput.value = anInput.defaultValue; }
    //-->
    </script>
    
    <div class="store_search_form">
      [search.form]
      [search.word onfocus='wash(this);' onblur='checkWash(this);' value='Search store...']
      [search.submit title='Go']
      [/search.form]
    </div>​
  6. Save the template code
  7. Update your store
  8. Paste the following code into your template files wherever you want the new search form to appear:
    Code:
    <?php echo datafeedr_tag("Search Form"); ?>

Eric