PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Custom Search Results Page

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

  • Custom Search Results Page

    I am trying to create a custom search results page.

    I have successfully embedded a Zoom V4 search form in my navigation and I have also created a custom search page (with additional searches, like Google and Amazon). I have modified the search results template with a header and ad banner, and some custom CSS.

    But what I really want to do, and have so far failed to do, is embed the search results in my page template. The site (on my own dedicated server) uses html pages that are parsed as php so I can include php includes. My page template includes 4 php includes that bring in the header, footer, and right and left side columns. The content is hard coded html which I place manually into the center of the template.

    When I modify the Zoom search results template, the php includes either fail to appear, or the search results appear below my page template (made up of four includes and a blank content area).

    I've looked at several solutions offered on your website and in the manual but I guess I don't fully understand the explanations. Perhaps you can clarify that what I want to do is actually possible, and if so, how to do it.

    Thanks.

  • #2
    Yes, this is possible, and it is answered in detail in our FAQ here:
    Q. How can I add headers & footers to the search template using SSIs or scripts?

    The above FAQ should address all your questions. But if you have a specific problem with a particular step of the instructions given, please tell us what it is.

    Originally posted by Fork View Post
    When I modify the Zoom search results template, the php includes either fail to appear
    As explained in the FAQ above, make sure you did not add the PHP include in the "search_template.html" file itself. You need to create a separate new PHP file (eg. "mysearch.php") which contains your PHP includes, as well as including the "search.php" script (assuming you are using the PHP version of Zoom, if not, again, see the FAQ for more details).

    Originally posted by Fork View Post
    ..., or the search results appear below my page template (made up of four includes and a blank content area).
    That sounds like you're missing a <!--ZOOMSEARCH--> tag in your "search_template.html" file. This is necessary to tell Zoom where the search results should appear (as opposed to just appearing at the bottom of the page).
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      I have the search form tag embedded in all my html pages. All my html pages are parsed as php, and my header, footer and nav columns are all php includes.

      I can get the custom results page to work when I create a new, separate php search page, as you describe above.

      But it doesn't appear to work when I search via the embedded form tag on a html page. I still get the search_template.html page for the results, and as you point out, the php includes don't work in that template. [You were right about the ZOOMSEARCH tag missing in one of my tests - but I fixed that.]

      How do I get a custom search results page, with my php includes, when called by the search form tags embedded in an html page?

      Comment


      • #4
        It sounds like your search forms are linking to the default search script, eg.

        Code:
        <form method="get" action="search.php">
        ...
        </form>
        If you have created your own search page (eg. "mysearch.php") as described in the FAQ given above, you should make sure your search forms also link to the page you created, rather than the default script. That is,

        Code:
        <form method="get" action="[B]mysearch.php[/B]">
        ...
        </form>
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment

        Working...
        X