Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion docs/add-ons/search/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,63 @@ With this parameter, you can specify the css class you want the form to have, en

With this parameter, you can specify the css id you want the form to have.

### `orderby=`

orderby="entry_date"

The "orderby" parameter sets the display order of the entries. The available values for this property are `entry_date`, `most_comments`, `recent_comment`, `title`, `status`, `entry_id`, `url_title`, `edit_date`, `comment_total`, `expiration_date`, `view_count_one`, `view_count_two`, `view_count_three`, `view_count_four`.`

If this parameter is not set, it will default to ordering by entry date.

### `sort=`

sort="asc"

sort="desc"

The sort order can be "asc" (ascending order or "oldest item first") or "desc" (descending order or "newest item first"). If you do not use a sort order the default is desc.

## Variables

A full discussion of the available variables is not feasible there is a great deal of interdependence between the various form fields, variables, and javascript functions. The Parameters can be used to modify how the search behaves. If you wish to modify the search form itself, simply use the default form as a base and customize it from there.
### `channel_names`

Pre-populated string containing list of `<option>` tags containing channels that can be used to select channel to search in.

### `lang:...`

Should you be willing to use the language string from ExpressionEngine language files to build the search, the following are available:

#### `lang:search_engine`
#### `lang:search`
#### `lang:search_by_keyword`
#### `lang:search_in_titles`
#### `lang:search_in_entries`
#### `lang:search_everywhere`
#### `lang:search_by_member_name`
#### `lang:exact_name_match`
#### `lang:exact_phrase_match`
#### `lang:also_search_comments`
#### `lang:any_date`
#### `lang:today_and`
#### `lang:this_week_and`
#### `lang:one_month_ago_and`
#### `lang:three_months_ago_and`
#### `lang:six_months_ago_and`
#### `lang:one_year_ago_and`
#### `lang:channels`
#### `lang:weblogs`
#### `lang:categories`
#### `lang:newer`
#### `lang:older`
#### `lang:sort_results_by`
#### `lang:date`
#### `lang:title`
#### `lang:most_comments`
#### `lang:recent_comment`
#### `lang:descending`
#### `lang:ascending`
#### `lang:search_entries_from`
#### `lang:any_category`
#### `lang:search_any_words`
#### `lang:search_all_words`
#### `lang:search_exact_word`
2 changes: 2 additions & 0 deletions docs/add-ons/search/results.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ An excerpt from the entry. The excerpt consists of the first 50 words from the f

The text from the entry. Unlike the {excerpt} variable, this one returns the entire text from the field specified for search excerpting in your [Channel Management](control-panel/channels.md) settings for your channels.

TIP: **Tip:** Use [variable modifiers](templates/variable-modifiers.md) to more precisely control the output of search results variables.

### `{id_auto_path}`

This parameter is replaced with the URL to the entry with the Entry ID appended to the end. Unlike other "path" variables, this variable does **not** require the Template_Group/Template to be specified. Instead, the path will automatically be determined by the Channel URL setting for the channel in [Channel Management](control-panel/channels.md).
Expand Down
16 changes: 16 additions & 0 deletions docs/add-ons/search/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,22 @@ With this parameter, you can specify the css class you want the form to have, en

With this parameter, you can specify the css id you want the form to have.

### `orderby=`

orderby="entry_date"

The "orderby" parameter sets the display order of the entries. The available values for this property are `entry_date`, `most_comments`, `recent_comment`, `title`, `status`, `entry_id`, `url_title`, `edit_date`, `comment_total`, `expiration_date`, `view_count_one`, `view_count_two`, `view_count_three`, `view_count_four`.`

If this parameter is not set, it will default to ordering by entry date.

### `sort=`

sort="asc"

sort="desc"

The sort order can be "asc" (ascending order or "oldest item first") or "desc" (descending order or "newest item first"). If you do not use a sort order the default is desc.

## Variables

There are no specific variables associated with the Simple Search Form. You may use the [{path=''}](templates/globals/path.md) Global Variable to create a link to an Advanced Search Form if you wish.