PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

display in masterpage

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

  • display in masterpage

    I have just purchased the pro version. I have an asp.net application with masterpages.

    I can add the search textbox and get results in my search.aspx page.

    However, I want to have my search.aspx page implement a masterpage also.

    So what I did was add a reference to the dll, so the main bin folder held the dll, and deleted the dll in the /search/bin folder. Then I added the following code:

    <%@ Page Title="" Language="VB" MasterPageFile="~/app_resources/masterpages/company.master" AutoEventWireup="false" %>
    <%@ Register TagPrefix="ZoomASPX" Namespace="ZoomASPX" Assembly="ZoomASPX" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href='<%= resolveUrl("~/app_resources/style/search.css") %>' rel="stylesheet" type="text/css" />
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <ZoomASPX:ASPXSearch id="ASPXSearch" runat="server"/>
    </asp:Content>

    My search_template file looks like the following:

    <h1>Search this site</h1>
    <p>
    Enter one or more keywords to search for using the Zoom Search Engine.<br />
    Note that '*' and '?' wildcards are supported.
    </p>
    <!--ZOOMSEARCH-->
    <script type="text/javascript">
    if (document.getElementById('zoom_searchbox'))
    { document.getElementById('zoom_searchbox').focus(); }
    </script>


    It actually works well and produces results.

    However, the code when it renders adds an additional form tag in the code, for the additional text box and submit button for re-searching.

    Do you know of a solution to this anyone please? ( I could change te code on pre-render but would prefer not to have to.)

    Thanks

  • #2
    You can disable the generated form via the Indexer. "Configure"->"Search Page"-> Change the "Search form:" dropdown from "Advanced" to "Do not generate". Note that you will need to re-index and upload your search files for this change to take effect.

    You can find an alternative search form HTML which does not involve any <form> tags here:
    http://www.wrensoft.com/zoom/support...spx_searchform
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      I'm having the same issue described (multiple form tags exist in the search.aspx page's HTML because I'm trying to embed the Zoom search results within a masterpage).

      I tried Ray's suggested approach of changing the indexer's "Configure" > "Search Page" > "Search form:" option to "Do not generate". Unfortunately, this setting still results in a blank form appearing in my rendered HTML:

      <form method="get" action="Search.aspx" class="zoom_searchform">
      </form>

      So, the <form> within a <form> issue still exists (the Zoom-generated form is nested within the ASP.Net form from the masterpage).

      Is there any other way to get rid of the Zoom-generated <form> in my Search.aspx page other than the method described in the link in Ray's reply (which involves programmatically calling search.cgi from within the ASP.Net page)? I'm not sure if the linked solution will work for me b/c I don't know that I will have the right permissions (CGI execute permission, etc.) on the server.

      If there isn't a current alternative, will a future version of the Zoom software NOT generate the <form> tags when rendering the search.aspx page if you specify to build an index for ASP.Net with the setting "Search form: Do not generate"?

      Thanks in advance for any help with this!

      Comment


      • #4
        Which build of Zoom are you using? Check by clicking on "Help"->"About" in the Indexer.

        The empty form tags (when set to "Do not generate") was a known bug that should have been fixed in V6.0 build 1018. You can download the latest build from here.

        More information here (including details of a workaround that provides more control over your template):
        http://www.wrensoft.com/forum/showth...?t=3481&page=2
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          I'm using V6.0 build 1018, and it still put in the <form> tag when I set it to "Do not generate."

          The workaround link you provided (replacing <!--ZOOMSEARCH--> with multiple <!--ZOOM_SHOW... --> tags in the search_template.html file) worked great, though!

          Thanks for your help.

          Comment


          • #6
            I can't reproduce the problem with V6.0 build 1018 here.

            Are you sure you are replacing the CGI file generated with the new build? You're not using an older "search.cgi" file generated by a previous build?
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              How strange. I did double-check that I'm running V6.0 build 1018. I also re-ran the indexer and ensured that I copied over the newly-generated index files.

              I specified ASP.Net as the platform (not CGI as you put in your reply) and set Configure > Search Page > Search Form Appearance > Do not generate. The files I copied over to my server were settings.zdat, zoom_dictionary.zdat, zoom_pagedata.zdat, zoom_pageinfo.zdat, zoom_pagetext.zdat, and zoom_wordmap.zdat. (I left my search_template.html that I had already instead of copying over.)

              When my search_template.html contains the line <!--ZOOMSEARCH-->, my rendered ASP.NET html does include a Zoom-generated <form> tag (causing a form within a form on my ASP.NET page). However, when I remove <!--ZOOMSEARCH--> in my template file and replace it with the multiple <!--ZOOM_SHOW... --> tags, everything is fine. (There is no duplicate <form> tag from Zoom...just the form tag I created on my .aspx page, which is what I need.)

              I hope this helps. Using the workaround does what I needed, but it is strange that you can't reproduce the issue.

              Comment


              • #8
                Sorry, I forgot you were using the ASP.NET version.

                You need to update the ASP.NET Server Control. This means uninstalling the "Zoom ASP.NET Server Control" under "Control Panel"->"Add or remove programs" on the web server, and downloading and installing the latest from here.
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment


                • #9
                  You're right. After I updated the server control, it worked fine when I have the line <!--ZOOMSEARCH--> in my search_template.html file.

                  Thanks!

                  Comment

                  Working...
                  X