Not a developer? Go to MovableType.com

Documentation

SearchResults

A container tag that creates a list of search results. This tag creates an entry and blog context that all Entry and Blog tags can be used. This tag is only recognized in search templates.

Attributes

The SearchSortBy and SearchResultDisplay configuration directives, if used, will override these options.

Example

<mt:SearchResults sort_by="title" sort_order="ascend">
    ... Search result item ...
</mt:SearchResults>
Back

2 Comments

Gautam Patel

Gautam Patel on November 27, 2010, 5:30 a.m. Reply

<mt:searchresults> seems to take the modifiers “sort_order” and “sort_by” (same as <mt:entries>) correctly.

So you can do something like

   <mt:searchresults sort_by="title" sort_order="ascend">

The [SearchSortBy][1] and [SearchResultDisplay][2] configuration directives may not be essential to achieve a sorting of search results as the code instance above seems to correctly combine the effect of both configuration and has the added advantage of not being system-wide but usable on a per-template/per-blog basis.

[1]: http://www.movabletype.org/documentation/appendices/config-directives/searchsortby.html

[2]: http://www.movabletype.org/documentation/appendices/config-directives/searchresultdisplay.html

Gautam Patel

Gautam Patel on November 27, 2010, 5:35 a.m. Reply

In fact, the configuration directives will conflict with, and over-ride, this usage in the template.