PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

How to put search results in my own template?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to put search results in my own template?

    Hi,

    Very new to this search engine thing. I have played around with this for several hours, but haven't found out how to do this.

    I would like to have the search results page formatted like all my other pages with the navigation menu on the left, the header up top, and the results to show up in the main content area.

    What do I put where? Everytime I try to add zoomsearch to my template (named search_template.html) it changes all the formatting of my page.

    Thanks for any help that you can provide. My site still under constructiion is located at www.coolnative.com.

    Mel
    Melissa

  • #2
    Not sure how you are "adding zoomsearch to your template". Can you elaborate on this? What web authoring software are you using?

    To change the appearance of the search results page, you simply modify the file "search_template.html" that is located in your output directory after indexing. Are you sure you are changing the right file in the correct directory? You will also need to re-upload this file to your server, after having updated it locally (like any other web page).

    For more information, please see chapter 5.6 in our Users Guide here:
    http://www.wrensoft.com/zoom/usersguide.html
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      How To Put Search Results on My Own Template?

      I know I'm not going to use the proper lingo to say this. Sorry ahead of time.

      I am using Nvu to create my website. I have a template that I use for all my pages, so that they all look the same. They all have the same top, same navigation menu on the side, etc.

      I would like my search results page to look like these other pages. I'm not sure how to modify 'search_template.html' so that it looks like my other pages.

      Should I be trying to add formatting to your 'search_template', or creating my own and trying to add the 'guts' from yours to mine and renaming my the same as yours? Have I lost you yet?

      Each time I try to put them "together", my page loses all its formatting (color, text, buttons, etc.) and the search results end up on the bottom of the page, rather than in the 'main' content section (where articles reside on other pages) where I would like it.

      I've looked at the User's Guide, but unfortunately, alot of it is over my head. I am learning as I go with this website building thing.

      Thanks again for any insight. I really, REALLY appreciate it. If I can get this working, I would be interested in purchasing the Standard Edition, so that I can search .pdfs as well. But I'm leary about purchasing when I can't figure out how to use it.

      Mel
      Melissa

      Comment


      • #4
        Re: How To Put Search Results on My Own Template?

        Originally posted by MelB
        Should I be trying to add formatting to your 'search_template', or creating my own and trying to add the 'guts' from yours to mine and renaming my the same as yours?
        I am not familiar with Nvu, but either of these methods should be possible.

        You can try to create your own "search_template.html" file. But you will need to make sure to add the following HTML comment:
        At the spot where you wish your search results to appear on that page. Make sure that you save your new "search_template.html" file in the output folder - where Zoom created its index files. And make sure to allow it to overwrite the existing default file Zoom created for you.

        You might also want to make sure that Nvu does not have any special options enabled to "optimize" a web page by stripping out comments. This would cause the search results to appear at the bottom of the page instead of where you want it to be.

        You should also be able to edit an existing page and insert your navigation menus into it. You do this by opening the "search_template.html" file in your output folder (created by Zoom after you indexed your site). You then modify this search page as you would any other webpage.

        Each time I try to put them "together", my page loses all its formatting (color, text, buttons, etc.) and the search results end up on the bottom of the page, rather than in the 'main' content section (where articles reside on other pages) where I would like it.
        More things to check:

        - If you are linking to a CSS file (which specifies the color of your text etc.), make sure the path to your CSS file is still valid. Especially if you have your search files in a different folder from the rest of your website.

        - If you created your own template file, you should copy/specify the CSS styles needed to change the appearance of the search results.

        - If you are not familiar with CSS (Cascading Styles Sheets), refer to your web editing software's documentation on this or online resources (google for "CSS tutorial").

        - Make sure that your resultant search template file contains the "" HTML comment, as mentioned above, and that it has not been stripped out or removed accidentally.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Ray,

          Thank you so much for the info!

          The loss of formatting was indeed a linking problem - being that my search results page was one subdirectory down from my stylesheet.

          After fixing that and playing around with exactly where to stick the individual style formatting for the results...

          Voila! It works!

          You rock! A little more refining to go, but it's looking great so far. You have made my night!

          Mel
          Melissa

          Comment


          • #6
            Same Problem

            I understand the linking issue... and that's not the problem for me, but I as well have customized my search page and I want the search results to appear in the "main content" portion of the site. Where I want the search results to appear, I have included this: <!--ZOOMSEARCH-->

            Then I upload and do a search. And, where do the search results go? Not in the main content, but either at the very bottom, or very top. How can I fix this issue? We are looking to purchase this as soon as I can prove to my boss this works like we want it to. Thank you.

            Comment


            • #7
              Solution Found

              I found one solution... for anyone experiencing this same issue. Just know you can't put the search results into a table cell and expect them to appear. In other words you can't do this:

              Code:
               <td height="539" valign="top"> <!--ZOOMSEARCH--></td>
              but you can do this:

              Code:
               <td height="539" valign="top"></td><!--ZOOMSEARCH-->
              or this:

              Code:
              <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--ZOOMSEARCH-->	
                  <tr>
                      <td width="647" height="539">&nbsp;</td>
                  </tr>
              </table>
              It seems to have worked for me just fine.
              Last edited by jeramiah; Apr-10-2007, 11:16 PM.

              Comment


              • #8
                you can't put the search results into a table cell and expect them to appear.
                That is not correct.

                This code should work fine,
                Code:
                <td valign="top">
                <!--ZOOMSEARCH-->
                </td>

                Comment


                • #9
                  As implied above, the <!--ZOOMSEARCH--> line must appear on a line of its own. The reason it did not work for jeramiah above is because he had the tag on the same line as other HTML.

                  This is documented in the Users Guide, Help file, and also in the default template file generated.
                  --Ray
                  Wrensoft Web Software
                  Sydney, Australia
                  Zoom Search Engine

                  Comment

                  Working...
                  X