[Zope-dev] Getting the count of hits while searching zcatalog

Deniz, Metin Metin.Deniz@commerzbankib.com
Tue, 26 Mar 2002 10:50:48 +0100


Hello everybody,

can you tell me how to get the count of hits searching a zcatalog.
I've the following code for presenting me the results, but i'm missing the
count of found files, where the full text search was performed.
----------------------------------------------------------------------------
-----------------------------
<dtml-in KCatalog size=5 start=query_start>
   <dtml-if sequence-start>

      <dtml-if previous-sequence>

        <a href="<dtml-var URL><dtml-var sequence-query
                 >query_start=<dtml-var
                 previous-sequence-start-number>">
        (Previous <dtml-var previous-sequence-size> results)
        </a>

      </dtml-if previous-sequence>

      <table border>
        <tr>
          <th>Nr</th>
          <th>Id</th>
          <th>Location</th>
        </tr>
      
   </dtml-if sequence-start>

        <tr>
          <td><dtml-var sequence-number></td>
          <td><dtml-var id></td>
          <td><a href="/zope<dtml-var "KCatalog.getpath(data_record_id_)">">
              <dtml-var "KCatalog.getpath(data_record_id_)"></a></td>
        </tr>

   <dtml-if sequence-end>

      </table>
      <dtml-if next-sequence>

         <a href="<dtml-var URL><dtml-var sequence-query
            >query_start=<dtml-var
            next-sequence-start-number>">
         (Next <dtml-var next-sequence-size> results)
         </a>

      </dtml-if next-sequence>
   </dtml-if sequence-end>

<dtml-else>

  There was no data matching this <dtml-var title_or_id> query.

</dtml-in>

<dtml-var standard_html_footer>
----------------------------------------------------------------------------
-----------------------------

Thanks,


Metin Deniz