Show
Ignore:
Timestamp:
07/09/08 20:16:36 (17 months ago)
Author:
bchoate
Message:

Updated POD for template tags; added test for template tag doc coverage.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/lib/MT/Template/Context/Search.pm

    r2420 r2742  
    3939########################################################################### 
    4040 
     41=head2 IfStraightSearch 
     42 
     43A conditional block which outputs its contents if the search in progress 
     44is a regular (or "straight") search. 
     45 
     46=for tags search 
     47 
     48=cut 
     49 
     50########################################################################### 
     51 
     52=head2 IfTagSearch 
     53 
     54A conditional block which outputs its contents if the search in progress 
     55is a search of entries by tag. 
     56 
     57=for tags search 
     58 
     59=cut 
     60 
     61########################################################################### 
     62 
     63=head2 NoSearch 
     64 
     65A container tag whose contents are displayed only if there is no search 
     66performed. 
     67 
     68This tag is only recognized in search templates. 
     69 
     70=for tags search 
     71 
     72=cut 
     73 
     74########################################################################### 
     75 
     76=head2 NoSearchResults 
     77 
     78A container tag whose contents are displayed if a search is performed 
     79but no results are found. 
     80 
     81This tag is only recognized in search templates. 
     82 
     83=for tags search 
     84 
     85=cut 
     86 
     87########################################################################### 
     88 
    4189=head2 SearchResultsHeader 
    4290 
     
    4896This tag is only recognized in SearchResults block. 
    4997 
     98B<Example:> 
     99 
     100    <mt:SearchResultsHeader> 
     101    <h3>Look what we found!</h3> 
     102    </mt:SearchResultsHeader> 
     103 
    50104=for tags search 
    51105 
     
    61115 
    62116This tag is only recognized in SearchResults block. 
     117 
     118B<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> 
    63124 
    64125=for tags search 
     
    110171This tag is only recognized in search templates. 
    111172 
     173=for tags search 
     174 
    112175=cut 
    113176 
     
    124187=cut 
    125188 
     189########################################################################### 
     190 
     191=head2 SearchIncludeBlogs 
     192 
     193Used in the search result template to pass the IncludeBlogs parameters 
     194through from the search form keeping the context of any followup search 
     195the same as the initial search. 
     196 
     197B<Example:> 
     198 
     199    <input type="hidden" name="IncludeBlogs" value="<$mt:SearchIncludeBlogs$>" /> 
     200 
     201=cut 
     202 
    126203sub _hdlr_include_blogs { $_[0]->stash('include_blogs') || '' } 
     204 
     205########################################################################### 
     206 
     207=head2 SearchString 
     208 
     209An HTML-encoded search query. This tag is only recognized in search templates. 
     210 
     211B<Example:> 
     212 
     213    <$mt:SearchString$> 
     214 
     215=for tags search 
     216 
     217=cut 
     218 
    127219sub _hdlr_search_string { $_[0]->stash('search_string') || '' } 
     220 
     221########################################################################### 
     222 
     223=head2 SearchTemplateID 
     224 
     225Returns the identifier of the search template (ie, "feed" or 
     226"nomorepizzaplease"). 
     227 
     228B<Example:> 
     229 
     230    <$mt:SearchTemplateID$> 
     231 
     232=for tags search 
     233 
     234=cut 
     235 
    128236sub _hdlr_template_id { $_[0]->stash('template_id') || '' } 
    129237sub _hdlr_max_results { $_[0]->stash('maxresults') || '' } 
     238 
     239########################################################################### 
     240 
     241=head2 SearchResultCount 
     242 
     243The number of results found across all of the blogs searched. This tag 
     244is only recognized in search templates. 
     245 
     246B<Example:> 
     247 
     248    <$mt:SearchResultCount$> 
     249 
     250=for tags search, count 
     251 
     252=cut 
    130253 
    131254sub _hdlr_result_count { 
     
    133256    $results ? $results : 0; 
    134257} 
     258 
     259########################################################################### 
     260 
     261=head2 SearchResults 
     262 
     263A container tag that creates a list of search results. This tag 
     264creates an entry and blog context that all Entry* and Blog* tags 
     265can be used. 
     266 
     267This tag is only recognized in search templates. 
     268 
     269=for tags search 
     270 
     271=cut 
    135272 
    136273sub _hdlr_results {