Index  Up  <<  >>  


In-page searches

You may specify a search inside a page with the [search-region parameters*] tag. The parameters are the same as the the one-click search, and the output is always a newline-separated list of the return objects -- by default a series of item codes.

The [loop ...] tag directly accepts a search parameter. To search for all products in the categories ``Americana'' and ``Contemporary'' you can do:

    [loop search="
        se=Americana
        se=Contemporary
        os=yes
        sf=category9
        "]
    Artist: [loop-field artist]<BR>
    Title: [loop-field title]<P>
    [/loop]

The advantage of the in-page search is that you can embed searches within searches, and you can have straight unchanging links from static HTML pages.

To place an in page search with the full range of display in a normal results page, use the [search-region] tag the same as above, except that you can place [search-list], [more-list], and [more] tags within it and use them to display and format the results -- including paging.

For example:

    [search-region  more=1
                    search="
                         se=Americana
                         sf=category
                         ml=2
                    "]
    [more-list][more][/more-list]
    [search-list]
    <A MV="page [item-code]" HREF="flypage.html">
        [item-field title]<A>, by [item-field artist]
    [/search-list]
    [no-match]
        Sorry, no matches for [value mv_searchspec].
    [/no-match]
    [/search-region]

If you want to use the same page for search paging, make sure you set the sp=page parameter.


Index  Up  <<  >>