search() and searchform()

Full text search in all articles with a single word or an expression with AND and/or OR. The search term is de value of parameter term or the value of qs/url parameter "s". You can filter the results and add a HTML format to show the results. searchform() is used to display en search form.

parameters

term="..."
search for articles with term, can also be an expression (see examples)
use querystring parameter "s"

author="..."
filter articles from one author by loginname

published="..."
filter articles between 2 published dates, separated by ' .. ' or after first date or before last date

created="..."
filter articles between 2 created dates, separated by ' .. ' or after first date or before last date

modified="..."
filter articles between 2 modified dates, separated by ' .. ' or after first date or before last date

displaying resources:

format="..."
Use custom HTML format with references to parts of the selected article. You can refer to a part of the article by tagname and index between []. For example [h1] for the title or [h2] for the first heading 2 or [p] for the first paragraph. Add a dot-number to specify other tag elements. [h2.3] for the third heading2 or [p5] for the fifth paragraph. [url] gives you the addres of the article and can be used within the href attribute of the a tag for a hyperlink. [date] can be used for the published date of the article. [photo.N] for the n-th photo of the article. You can use this same parameter with article().

ratio: ...
Only applicable when [photo] is used in format. Preferred ratio or 'cover' for photos (default= 3:2).

order= "rating | title | label | field | published | modified | created"
Use another order instead of the default "rating"

max="NUM"
max number of articles to display (default=10)

nr="x"
select article number nr or all articles between 2 numbers, separated bij ' .. '

examples

search(format='<a class="find-item" href="/[url]"><h2>[title]</h2><div class="intro">[p]</div></a>')