Skip to content

Commit fe3074c

Browse files
authored
Merge pull request #64 from nep/patch-2
Updating the switch tag example and variable
2 parents 8eec42c + 7ca1aa5 commit fe3074c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/add-ons/search/results.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ The Search Results Tag controls how you display results from your searches. Exam
2525
<th>{lang:recent_comments}</th>
2626
</tr>
2727

28-
{exp:search:search_results switch="resultRowOne|resultRowTwo"}
28+
{exp:search:search_results}
2929

30-
<tr class="{switch}">
30+
<tr class="{switch="resultRowOne|resultRowTwo"}">
3131
<td width="30%" valign="top"><b><a href="{auto_path}">{title}</a></b></td>
3232
<td width="30%" valign="top">{excerpt}</td>
3333
<td width="10%" valign="top"><a href="{member_path='member/index'}">{author}</a></td>
@@ -110,6 +110,14 @@ This parameter is replaced with the URL to the entry with the Entry ID appended
110110

111111
The Template_Group/Template with which to display the member profile of the author of the entry. Typically, this variable will be specified as {member_path='member/index'}.
112112

113+
### `{switch=}`
114+
115+
{switch="option_one|option_two|option_three"}
116+
117+
This variable permits you to rotate through any number of values as the entries are displayed. The first entry will use "option_one", the second will use "option_two", the third "option_three", the fourth "option_one", and so on.
118+
119+
Multiple instances of the {switch=} tag may be used and ExpressionEngine will intelligently keep track of each one.
120+
113121
## Search Keywords Tag
114122

115123
This tag lets you display the keywords used to perform a search. It is used on the search results page in order to show the user exactly what search terms they used:

0 commit comments

Comments
 (0)