

[% # This is just an example -- you would want your own "page" for the wrapper %]

[% WRAPPER page %]

    [% PROCESS swish_header %]


    [% title = PROCESS title %]

    [% IF ! search.results %]
        [% PROCESS show_message %]
        [% PROCESS search_form %]

    [% ELSE %]
        [% PROCESS search_form %]
        [% PROCESS nav_bar %]
        [% PROCESS results_list %]
    [% END %]

    [% PROCESS swish_footer %]

[% END %]

[% # This is just an example -- you would want your own "page" to wrap around "swish" %]
[% BLOCK page %]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<head>

   [% title || "Welcome"  %]

   [% content %]

[% END %]

[% BLOCK title %]
    [% IF ! search.results %]
        [% search.errstr || search.config('title') || "Search page" %]

    [% ELSE %]
        [% search.navigation('hits') %] Results for [[% search.query_simple | html %]]
    [% END %]
[% END %]

[% BLOCK swish_header %]    

    <table border="0" cellpadding="0" cellspacing="0">
    <tr><td>
        <a href="http://swish-e.org">
        <img border="0" alt="Swish-e home page" src="http://swish-e.org/graphics/swish-e.gif"></a>
    </td><td valign="middle">
        <font size="+3">[% search.config('title') || "Search page"  %]</font>
    </td></tr>
    </table>

[% END %]    

[% BLOCK swish_footer %] 

    [% PROCESS nav_bar_pages2 %]
    <hr>
    <small>Powered by <em>Swish-e</em> <a href="http://swish-e.org">swish-e.org</a></small>
    [% IF search.MOD_PERL %]
        <br><small>Response brought to you by <a href="http://perl.apache.org"><em>mod_perl</em></a></small>
    [% END %]
  

[% END %]    

[% BLOCK show_message %]
    [% IF search.errstr %]
        [% search.errstr | html %]
    [% END %]
[% END %]

[% BLOCK search_form %]
    [% CGI.start_form( '-action' => CGI.script_name, '-method' => 'GET' ) %]
        [% CGI.textfield( {
            name    => 'query',
            size    => 40,
            maxlength => 200,
            } ) %]

        [% CGI.submit('submit','Search!') %]<br>
        [% search.get_meta_name_limits %]
        [% search.get_sort_select_list %]
        [% search.get_index_select_list %]
        [% search.get_limit_select %]
        [% search.get_date_ranges %]
        
    [% CGI.end_form.join('') %]

[% END %]

[% BLOCK nav_bar %]
    [% search.stopwords_removed %]

                 Results for [% search.query_simple | html %]
                  [% search.navigation('from') %] to [% search.navigation('to') %] of [% search.navigation('hits') %] results.

                Run time: [% search.navigation('run_time') %] |
                Search time: [% search.navigation('search_time') %]    

        [% IF search.navigation('pages') %]

        <tr>
            <td colspan=2 bgcolor="#EEEEEE">
                [%# PROCESS nav_bar_pages %]
                [% PROCESS nav_bar_pages2 %]
            </td>
        </tr>
        [% END %]

    </table>
[% END %]

[% BLOCK nav_bar_pages %]                
     Page:
    [% search.navigation('pages') %]

    [% IF search.navigation('prev_count') %]
        <a href="[% search.query_href %]&amp;start=[% search.navigation('prev') %]">
        Previous [% search.navigation('prev_count') %]</a>
    [% END %]

    [% IF search.navigation('next_count') %]
        <a href="[% search.query_href %]&amp;start=[% search.navigation('next') %]">
        Next [% search.navigation('next_count') %]</a>
    [% END %]
[% END %]

[%#
    Insead of pre-formatted numeric page links as above, you can use this
    example to generate the pages individually.
    For example, allows using images for page numbers.
%]

[% BLOCK nav_bar_pages2 %]
     

    [% IF search.navigation('prev_count') %]
        <a style="text-decoration:none" href="[% search.query_href %]&amp;start=[% search.navigation('prev') %]">&lt;&lt;</a>
    [% END %]


    [% FOR page = search.navigation('page_array') %]
        [% IF page.cur_page %]
            [[% page.page_number %]]
        [% ELSE %]
            <a style="text-decoration:none" href="[% search.query_href %];start=[% page.page_start %]">[% page.page_number %]</a>
        [% END %]
    [% END %]

    [% IF search.navigation('next_count') %]
        <a style="text-decoration:none" href="[% search.query_href %]&amp;start=[% search.navigation('next') %]">&gt;&gt;</a>
    [% END %]
[% END %]

[% BLOCK results_list %]
    [% FOREACH item = search.results %]
        <dl>
            <dt>
                [% item.swishreccount %]
                 
                [% ( item.swishtitle || item.swishdocpath )  %]

                <small>-- rank: <b>[% item.swishrank %]</b></small>
            </dt>

            <dd>
                [% item.swishdescription %]
                <br>
                <small>
                    [% item.swishdocpath %]
                    - [% item.swishdocsize %] bytes
                    - [% item.swishlastmodified %]
                </small>
            </dd>
        </dl>
    [% END %]
[% END %]
    

    

