Changeset 2742 for branches/release-41/lib/MT/Template/Context/Search.pm
- Timestamp:
- 07/09/08 20:16:36 (17 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-41/lib/MT/Template/Context/Search.pm
r2420 r2742 39 39 ########################################################################### 40 40 41 =head2 IfStraightSearch 42 43 A conditional block which outputs its contents if the search in progress 44 is a regular (or "straight") search. 45 46 =for tags search 47 48 =cut 49 50 ########################################################################### 51 52 =head2 IfTagSearch 53 54 A conditional block which outputs its contents if the search in progress 55 is a search of entries by tag. 56 57 =for tags search 58 59 =cut 60 61 ########################################################################### 62 63 =head2 NoSearch 64 65 A container tag whose contents are displayed only if there is no search 66 performed. 67 68 This tag is only recognized in search templates. 69 70 =for tags search 71 72 =cut 73 74 ########################################################################### 75 76 =head2 NoSearchResults 77 78 A container tag whose contents are displayed if a search is performed 79 but no results are found. 80 81 This tag is only recognized in search templates. 82 83 =for tags search 84 85 =cut 86 87 ########################################################################### 88 41 89 =head2 SearchResultsHeader 42 90 … … 48 96 This tag is only recognized in SearchResults block. 49 97 98 B<Example:> 99 100 <mt:SearchResultsHeader> 101 <h3>Look what we found!</h3> 102 </mt:SearchResultsHeader> 103 50 104 =for tags search 51 105 … … 61 115 62 116 This tag is only recognized in SearchResults block. 117 118 B<Example:> 119 120 <mt:SearchResultsFooter> 121 <p>If you didn't find what you were looking for, you can also peruse 122 the <a href="<mt:Link identifier="archive_index">">site archives</a>.</p> 123 </mt:SearchResultsFooter> 63 124 64 125 =for tags search … … 110 171 This tag is only recognized in search templates. 111 172 173 =for tags search 174 112 175 =cut 113 176 … … 124 187 =cut 125 188 189 ########################################################################### 190 191 =head2 SearchIncludeBlogs 192 193 Used in the search result template to pass the IncludeBlogs parameters 194 through from the search form keeping the context of any followup search 195 the same as the initial search. 196 197 B<Example:> 198 199 <input type="hidden" name="IncludeBlogs" value="<$mt:SearchIncludeBlogs$>" /> 200 201 =cut 202 126 203 sub _hdlr_include_blogs { $_[0]->stash('include_blogs') || '' } 204 205 ########################################################################### 206 207 =head2 SearchString 208 209 An HTML-encoded search query. This tag is only recognized in search templates. 210 211 B<Example:> 212 213 <$mt:SearchString$> 214 215 =for tags search 216 217 =cut 218 127 219 sub _hdlr_search_string { $_[0]->stash('search_string') || '' } 220 221 ########################################################################### 222 223 =head2 SearchTemplateID 224 225 Returns the identifier of the search template (ie, "feed" or 226 "nomorepizzaplease"). 227 228 B<Example:> 229 230 <$mt:SearchTemplateID$> 231 232 =for tags search 233 234 =cut 235 128 236 sub _hdlr_template_id { $_[0]->stash('template_id') || '' } 129 237 sub _hdlr_max_results { $_[0]->stash('maxresults') || '' } 238 239 ########################################################################### 240 241 =head2 SearchResultCount 242 243 The number of results found across all of the blogs searched. This tag 244 is only recognized in search templates. 245 246 B<Example:> 247 248 <$mt:SearchResultCount$> 249 250 =for tags search, count 251 252 =cut 130 253 131 254 sub _hdlr_result_count { … … 133 256 $results ? $results : 0; 134 257 } 258 259 ########################################################################### 260 261 =head2 SearchResults 262 263 A container tag that creates a list of search results. This tag 264 creates an entry and blog context that all Entry* and Blog* tags 265 can be used. 266 267 This tag is only recognized in search templates. 268 269 =for tags search 270 271 =cut 135 272 136 273 sub _hdlr_results {
