Changeset 2742

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

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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 { 
  • branches/release-41/lib/MT/Template/ContextHandlers.pm

    r2728 r2742  
    10751075########################################################################### 
    10761076 
     1077=head2 string_format 
     1078 
     1079An alias for the 'sprintf' modifier. 
     1080 
     1081=cut 
     1082 
     1083########################################################################### 
     1084 
    10771085=head2 sprintf 
    10781086 
     
    12281236=over 4 
    12291237 
    1230 =item html 
     1238=item * html 
    12311239 
    12321240Similar to the 'encode_html' modifier. Escapes special characters as 
    12331241HTML entities. 
    12341242 
    1235 =item url 
     1243=item * url 
    12361244 
    12371245Similar to the 'encode_url' modifier. Escapes special characters using 
    12381246a URL-encoded format (ie, " " becomes "%20"). 
    12391247 
    1240 =item javascript or js 
     1248=item * javascript or js 
    12411249 
    12421250Similar to the 'encode_js' modifier. Escapes special characters such 
     
    12441252in a JavaScript string. 
    12451253 
    1246 =item mail 
     1254=item * mail 
    12471255 
    12481256A very simple email obfuscation technique. 
     
    14551463########################################################################### 
    14561464 
     1465=head2 TemplateNote 
     1466 
     1467A function tag that always returns an empty string. This tag is useful 
     1468for placing simple notes in your templates, since it produces nothing. 
     1469 
     1470B<Example:> 
     1471 
     1472    <$mt:TemplateNote note="Hi, mom!"$> 
     1473 
     1474=for tags templating 
     1475 
     1476=cut 
     1477 
     1478########################################################################### 
     1479 
     1480=head2 Ignore 
     1481 
     1482A block tag that always produces an empty string. This tag is useful 
     1483for wrapping template code you wish to disable, or perhaps annotating 
     1484sections of your template. 
     1485 
     1486B<Example:> 
     1487 
     1488    <mt:Ignore> 
     1489        The API key for the following tag is D3ADB33F. 
     1490    </mt:Ignore> 
     1491 
     1492=for tags templating 
     1493 
     1494=cut 
     1495 
     1496########################################################################### 
     1497 
     1498=head2 IfStatic 
     1499 
     1500Returns true if the current publishing context is static publishing, 
     1501and false otherwise. 
     1502 
     1503=for tags templating, utility 
     1504 
     1505=cut 
     1506 
     1507########################################################################### 
     1508 
     1509=head2 IfDynamic 
     1510 
     1511Returns true if the current publishing context is dynamic publishing, 
     1512and false otherwise. 
     1513 
     1514=for tags templating, utility 
     1515 
     1516=cut 
     1517 
     1518########################################################################### 
     1519 
    14571520=head2 App:Listing 
    14581521 
     
    15261589=over 4 
    15271590 
    1528 =item type (optional) 
     1591=item * type (optional) 
    15291592 
    15301593The C<MT::Object> object type the listing is processing. If unset, 
    15311594will use the contents of the C<object_type> variable. 
    15321595 
    1533 =item loop (optional) 
     1596=item * loop (optional) 
    15341597 
    15351598The source of data to process. This is an array of hashes, similar 
     
    15371600variable is used instead. 
    15381601 
    1539 =item empty_message (optional) 
     1602=item * empty_message (optional) 
    15401603 
    15411604Used when there are no rows to output for the listing. If not set, 
     
    15441607found. 
    15451608 
    1546 =item id (optional) 
     1609=item * id (optional) 
    15471610 
    15481611Used to construct the DOM id for the listing. The outer C<div> tag 
     
    15511614attribute). 
    15521615 
    1553 =item listing_class (optional) 
     1616=item * listing_class (optional) 
    15541617 
    15551618Provides a custom class name that can be applied to the main 
     
    15571620that is always applied). 
    15581621 
    1559 =item action (optional; default 'script_url' variable) 
     1622=item * action (optional; default 'script_url' variable) 
    15601623 
    15611624Supplies the 'action' attribute of the C<form> tag produced. 
    15621625 
    1563 =item hide_pager (optional; default '0') 
     1626=item * hide_pager (optional; default '0') 
    15641627 
    15651628Controls whether the pagination controls are shown or not. 
    15661629If unspecified, pagination is shown. 
    15671630 
    1568 =item show_actions (optional; default '1') 
     1631=item * show_actions (optional; default '1') 
    15691632 
    15701633Controls whether the actions associated with the object type 
     
    16771740=over 4 
    16781741 
    1679 =item mode 
     1742=item * mode 
    16801743 
    16811744Maps to a '__mode' argument. 
    16821745 
    1683 =item type 
     1746=item * type 
    16841747 
    16851748Maps to a '_type' argument. 
     
    17411804=over 4 
    17421805 
    1743 =item bar_position (optional; default "top") 
     1806=item * bar_position (optional; default "top") 
    17441807 
    17451808Assigns a CSS class name indicating whether the control is above or 
    17461809below the listing or edit form it is associated with. 
    17471810 
    1748 =item hide_pager 
     1811=item * hide_pager 
    17491812 
    17501813Assign either 1 or 0 to control whether the pagination controls are 
    17511814displayed or not. 
    17521815 
    1753 =item form_id 
     1816=item * form_id 
    17541817 
    17551818Associates the pagition controls and item action widget with the 
     
    17931856=over 4 
    17941857 
    1795 =item id (optional) 
     1858=item * id (optional) 
    17961859 
    17971860If specified, will be used as the 'id' attribute for the outermost C<div> 
     
    17991862variable instead. 
    18001863 
    1801 =item label (required) 
     1864=item * label (required) 
    18021865 
    18031866The label to display above the widget. 
    18041867 
    1805 =item label_link (optional) 
     1868=item * label_link (optional) 
    18061869 
    18071870If specified, this link will wrap the label for the widget. 
    18081871 
    1809 =item label_onclick 
     1872=item * label_onclick 
    18101873 
    18111874If specified, this JavaScript code will be assigned to the 'onclick' 
    18121875attribute of a link tag wrapping the widget label. 
    18131876 
    1814 =item class (optional) 
     1877=item * class (optional) 
    18151878 
    18161879If unspecified, will use the id of the widget. This class is included in the 
    18171880'class' attribute of the outermost C<div> tag for the widget. 
    18181881 
    1819 =item header_action 
    1820  
    1821 =item can_close (optional; default "0") 
     1882=item * header_action 
     1883 
     1884=item * can_close (optional; default "0") 
    18221885 
    18231886Identifies whether widget may be closed or not. 
    18241887 
    1825 =item tabbed (optional; default "0") 
     1888=item * tabbed (optional; default "0") 
    18261889 
    18271890If specified, the widget will be assigned an attribute that gives it 
     
    19321995=over 4 
    19331996 
    1934 =item id (optional) 
    1935  
    1936 =item class (optional; default "info") 
    1937  
    1938 =item rebuild (optional) 
     1997=item * id (optional) 
     1998 
     1999=item * class (optional; default "info") 
     2000 
     2001=item * rebuild (optional) 
    19392002 
    19402003Accepted values: "all", "index". 
    19412004 
    1942 =item can_close (optional; default "1") 
     2005=item * can_close (optional; default "1") 
    19432006 
    19442007=back 
     
    20632126=over 4 
    20642127 
    2065 =item action (optional) 
     2128=item * action (optional) 
    20662129 
    20672130Identifies the URL to submit the form to. If not given, will use 
    20682131the current application URI. 
    20692132 
    2070 =item method (optional; default "POST") 
     2133=item * method (optional; default "POST") 
    20712134 
    20722135Supplies the C<form> method. "GET" or "POST" are the typical values 
    20732136for this, but will accept any HTTP-compatible method (ie: "PUT", "DELETE"). 
    20742137 
    2075 =item object_id (optional) 
     2138=item * object_id (optional) 
    20762139 
    20772140Populates a hidden 'id' field in the form. If not given, will also use any 
    20782141'id' template variable defined. 
    20792142 
    2080 =item blog_id (optional) 
     2143=item * blog_id (optional) 
    20812144 
    20822145Populates a hidden 'blog_id' field in the form. If not given, will also use 
    20832146any 'blog_id' template variable defined. 
    20842147 
    2085 =item object_type (optional) 
     2148=item * object_type (optional) 
    20862149 
    20872150Populates a hidden '_type' field in the form. If not given, will also use 
    20882151any 'type' template variable defined. 
    20892152 
    2090 =item id (optional) 
     2153=item * id (optional) 
    20912154 
    20922155Used to form the 'id' element of the HTML C<form> tag. If not specified, 
     
    20942157determined object_type. 
    20952158 
    2096 =item name (optional) 
     2159=item * name (optional) 
    20972160 
    20982161Supplies the C<form> name attribute. If unspecified, will use the C<id> 
    20992162attribute, if available. 
    21002163 
    2101 =item enctype (optional) 
     2164=item * enctype (optional) 
    21022165 
    21032166If assigned, sets an 'enctype' attribute on the C<form> tag using the value 
     
    21752238=over 4 
    21762239 
    2177 =item id (required) 
     2240=item * id (required) 
    21782241 
    21792242A unique identifier for this group of settings. 
    21802243 
    2181 =item class (optional) 
     2244=item * class (optional) 
    21822245 
    21832246If specified, applies this CSS class to the C<fieldset> tag produced. 
    21842247 
    2185 =item shown (optional; default "1") 
     2248=item * shown (optional; default "1") 
    21862249 
    21872250Controls whether the C<fieldset> is initially shown or not. If hidden, 
     
    22302293=over 4 
    22312294 
    2232 =item id (required) 
     2295=item * id (required) 
    22332296 
    22342297Each application setting tag requires a unique 'id' attribute. This id 
    22352298should not be re-used within the template. 
    22362299 
    2237 =item required (optional; default "0") 
     2300=item * required (optional; default "0") 
    22382301 
    22392302Controls whether the field is displayed with visual cues that the 
    22402303field is a required field or not. 
    22412304 
    2242 =item label 
     2305=item * label 
    22432306 
    22442307Supplies the label phrase for the setting. 
    22452308 
    2246 =item show_label (optional; default "1") 
     2309=item * show_label (optional; default "1") 
    22472310 
    22482311Controls whether the label portion of the setting is shown or not. 
    22492312 
    2250 =item shown (optional; default "1") 
     2313=item * shown (optional; default "1") 
    22512314 
    22522315Controls whether the setting is visible or not. If specified, adds 
     
    22542317setting. 
    22552318 
    2256 =item label_class (optional) 
     2319=item * label_class (optional) 
    22572320 
    22582321Allows an additional CSS class to be applied to the label of the 
    22592322setting. 
    22602323 
    2261 =item content_class (optional) 
     2324=item * content_class (optional) 
    22622325 
    22632326Allows an addtional CSS class to be applied to the contents of the 
    22642327setting. 
    22652328 
    2266 =item hint (optional) 
     2329=item * hint (optional) 
    22672330 
    22682331Supplies a "hint" phrase that provides inline instruction to the user. 
     
    22702333forces it to display. 
    22712334 
    2272 =item show_hint (optional; default "0") 
     2335=item * show_hint (optional; default "0") 
    22732336 
    22742337Controls whether the inline help 'hint' label is shown or not. 
    22752338 
    2276 =item warning 
     2339=item * warning 
    22772340 
    22782341Supplies a warning message to the user regarding the use of this setting. 
    22792342 
    2280 =item show_warning 
     2343=item * show_warning 
    22812344 
    22822345Controls whether the warning message is shown or not. 
    22832346 
    2284 =item help_page 
     2347=item * help_page 
    22852348 
    22862349Identifies a specific page of the MT help documentation for this setting. 
    22872350 
    2288 =item help_section 
     2351=item * help_section 
    22892352 
    22902353Identifies a section name of the MT help documentation for this setting. 
     
    24082471=over 4 
    24092472 
    2410 =item var (optional) 
     2473=item * var (optional) 
    24112474 
    24122475If assigned, the current 'index' of the loop is assigned to this template 
    24132476variable. 
    24142477 
    2415 =item from (optional; default "0") 
    2416  
    2417 =item start 
     2478=item * from (optional; default "0") 
     2479 
     2480=item * start 
    24182481 
    24192482Identifies the starting number for the loop. 
    24202483 
    2421 =item to 
    2422  
    2423 =item end 
     2484=item * to 
     2485 
     2486=item * end 
    24242487 
    24252488Identifies the ending number for the loop. Either 'to' or 'end' must 
    24262489be specified. 
    24272490 
    2428 =item step (optional; default "1") 
    2429  
    2430 =item increment 
     2491=item * step (optional; default "1") 
     2492 
     2493=item * increment 
    24312494 
    24322495Provides the amount to increment the loop counter. 
    24332496 
    2434 =item glue (optional) 
     2497=item * glue (optional) 
    24352498 
    24362499If specified, this string is added inbetween each block of the loop. 
     
    24422505=over 4 
    24432506 
    2444 =item __first__ 
     2507=item * __first__ 
    24452508 
    24462509Assigned 1 when the loop is in the first iteration. 
    24472510 
    2448 =item __last__ 
     2511=item * __last__ 
    24492512 
    24502513Assigned 1 when the loop is in the last iteration. 
    24512514 
    2452 =item __odd__ 
     2515=item * __odd__ 
    24532516 
    24542517Assigned 1 when the loop index is odd, 0 when it is even. 
    24552518 
    2456 =item __even__ 
     2519=item * __even__ 
    24572520 
    24582521Assigned 1 when the loop index is even, 0 when it is odd. 
    24592522 
    2460 =item __index__ 
     2523=item * __index__ 
    24612524 
    24622525Holds the current loop index value, even if the 'var' attribute has 
    24632526been given. 
    24642527 
    2465 =item __counter__ 
     2528=item * __counter__ 
    24662529 
    24672530Tracks the number of times the loop has run (starts at 1). 
     
    25972660=over 4 
    25982661 
    2599 =item name 
    2600  
    2601 =item var 
     2662=item * name 
     2663 
     2664=item * var 
    26022665 
    26032666Declares a variable to test. When none of the comparison attributes are 
     
    26052668a "true" value, meaning if it is assigned a non-empty, non-zero value. 
    26062669 
    2607 =item tag 
     2670=item * tag 
    26082671 
    26092672Declares a MT tag to execute; the value of which is used for testing. 
     
    26132676If tag passes through the logical result of that conditional tag. 
    26142677 
    2615 =item op 
     2678=item * op 
    26162679 
    26172680If specified, applies the specified mathematical operator to the value 
     
    26212684=over 4 
    26222685 
    2623 =item + or add 
     2686=item * + or add 
    26242687 
    26252688Addition. 
    26262689 
    2627 =item - or sub 
     2690=item * - or sub 
    26282691 
    26292692Subtraction. 
    26302693 
    2631 =item ++ or inc 
     2694=item * ++ or inc 
    26322695 
    26332696Adds 1 to the given value. 
    26342697 
    2635 =item -- or dec 
     2698=item * -- or dec 
    26362699 
    26372700Subtracts 1 from the given value. 
    26382701 
    2639 =item * or mul 
     2702=item * * or mul 
    26402703 
    26412704Multiplication. 
    26422705 
    2643 =item / or div 
     2706=item * / or div 
    26442707 
    26452708Division. 
    26462709 
    2647 =item % or mod 
     2710=item * % or mod 
    26482711 
    26492712Issues a modulus operator. 
     
    26512714=back 
    26522715 
    2653 =item value 
     2716=item * value 
    26542717 
    26552718Used in conjunction with the 'op' attribute. 
    26562719 
    2657 =item eq 
     2720=item * eq 
    26582721 
    26592722Tests whether the given value is equal to the value of the 'eq' attribute. 
    26602723 
    2661 =item ne 
     2724=item * ne 
    26622725 
    26632726Tests whether the given value is not equal to the value of the 'ne' attribute. 
    26642727 
    2665 =item gt 
     2728=item * gt 
    26662729 
    26672730Tests whether the given value is greater than the value of the 'gt' attribute. 
    26682731 
    2669 =item lt 
     2732=item * lt 
    26702733 
    26712734Tests whether the given value is less than the value of the 'lt' attribute. 
    26722735 
    2673 =item ge 
     2736=item * ge 
    26742737 
    26752738Tests whether the given value is greater than or equal to the value of the 
    26762739'ge' attribute. 
    26772740 
    2678 =item le 
     2741=item * le 
    26792742 
    26802743Tests whether the given value is less than or equal to the value of the 
    26812744'le' attribute. 
    26822745 
    2683 =item like 
     2746=item * like 
    26842747 
    26852748Tests whether the given value matches the regex pattern in the 'like' 
    26862749attribute. 
    26872750 
    2688 =item test 
     2751=item * test 
    26892752 
    26902753Uses a Perl (or PHP under Dynamic Publishing) expression. For Perl, this 
     
    29693032########################################################################### 
    29703033 
     3034=head2 Unless 
     3035 
     3036A conditional tag that is the logical opposite of the L<If> tag. All 
     3037attributes supported by the L<If> tag are also supported for this tag. 
     3038 
     3039=for tags templating 
     3040 
     3041=cut 
     3042 
     3043########################################################################### 
     3044 
    29713045=head2 Loop 
    29723046 
     
    29813055=over 4 
    29823056 
    2983 =item name 
    2984  
    2985 =item var 
     3057=item * name 
     3058 
     3059=item * var 
    29863060 
    29873061The template variable that contains the array of hashref data to 
    29883062process. 
    29893063 
    2990 =item sort_by (optional) 
     3064=item * sort_by (optional) 
    29913065 
    29923066Causes the data in the given array to be resorted in the manner 
     
    30003074    sort_by="key reverse"; sort_by="value numeric" 
    30013075 
    3002 =item glue (optional) 
     3076=item * glue (optional) 
    30033077 
    30043078If specified, this string will be placed inbetween each "row" 
     
    30123086=over 4 
    30133087 
    3014 =item __first__ 
     3088=item * __first__ 
    30153089 
    30163090Assigned when the loop is in the first iteration. 
    30173091 
    3018 =item __last__ 
     3092=item * __last__ 
    30193093 
    30203094Assigned when the loop is in the last iteration. 
    30213095 
    3022 =item __odd__ 
     3096=item * __odd__ 
    30233097 
    30243098Assigned 1 when the loop is on odd numbered rows, 0 when even. 
    30253099 
    3026 =item __even__ 
     3100=item * __even__ 
    30273101 
    30283102Assigned 1 when the loop is on even numbered rows, 0 when odd. 
    30293103 
    3030 =item __key__ 
     3104=item * __key__ 
    30313105 
    30323106When looping over a hashref template variable, this variable is 
    30333107assigned the key currently in context. 
    30343108 
    3035 =item __value__ 
     3109=item * __value__ 
    30363110 
    30373111This variable holds the value of the array or hashref element 
     
    31383212An alias for the 'Var' tag, and considered deprecated in favor of 'Var'. 
    31393213 
     3214=for tags deprecated 
     3215 
    31403216=cut 
    31413217 
     
    31503226=over 4 
    31513227 
    3152 =item name (or var) 
     3228=item * name (or var) 
    31533229 
    31543230Identifies the template variable. The 'name' attribute supports a variety 
     
    31753251    <mt:Var name="count(foo)"> 
    31763252 
    3177 =item op 
     3253=item * op 
    31783254 
    31793255Along with the 'value' attribute, this allows the application of 
     
    31813257are supported). 
    31823258 
    3183 =item value 
     3259=item * value 
    31843260 
    31853261If provided with the 'op' attribute, provides the operand for the 
     
    31903266is useful for setting variables as well. 
    31913267 
    3192 =item function 
     3268=item * function 
    31933269 
    31943270For array template variables, this attribute supports: 
     
    31963272=over 4 
    31973273 
    3198 =item pop 
     3274=item * pop 
    31993275 
    32003276Takes an element from the end of the array (last element). 
    32013277 
    3202 =item shift 
     3278=item * shift 
    32033279 
    32043280Takes an element from the front of the array (index 0). 
    32053281 
    3206 =item count 
     3282=item * count 
    32073283 
    32083284Returns the number of elements in the array template variable. 
     
    32143290=over 4 
    32153291 
    3216 =item delete 
     3292=item * delete 
    32173293 
    32183294Only valid when used with the 'key' attribute, or if a key is present 
    32193295in the variable name. 
    32203296 
    3221 =item count 
     3297=item * count 
    32223298 
    32233299Returns the number of keys present in the hash template variable. 
     
    32253301=back 
    32263302 
    3227 =item index 
     3303=item * index 
    32283304 
    32293305Identifies an element of an array template variable. 
    32303306 
    3231 =item key 
     3307=item * key 
    32323308 
    32333309Identifies a key of a hash template variable. 
    32343310 
    3235 =item default 
     3311=item * default 
    32363312 
    32373313If the variable is undefined or empty, this value will be output instead. 
    32383314 
    3239 =item to_json 
     3315=item * to_json 
    32403316 
    32413317Formats the variable in JSON notation. 
    32423318 
    3243 =item glue 
     3319=item * glue 
    32443320 
    32453321For array template variables, this attribute is used in joining the 
     
    34373513=over 4 
    34383514 
    3439 =item tag or name 
     3515=item * tag or name 
    34403516 
    34413517If either 'name' or 'tag' are specified, tests the entry in context 
     
    35533629=over 4 
    35543630 
    3555 =item glue 
     3631=item * glue 
    35563632 
    35573633A text string that is used to join each of the items together. For example 
     
    35613637would print out each tag name separated by a comma and a space. 
    35623638 
    3563 =item type 
     3639=item * type 
    35643640 
    35653641The kind of object for which to show tags. By default the entry tags are shown. 
    35663642 
    3567 =item sort_by 
     3643=item * sort_by 
    35683644 
    35693645The tag object column on which to order the tags. Common values are name and 
    35703646rank. By default tags are sorted by name. 
    35713647 
    3572 =item sort_order 
     3648=item * sort_order 
    35733649 
    35743650The direction in which to sort tags by the sort_by field. Possible values 
     
    35763652when sorted by name and descending order when sorted by other columns. 
    35773653 
    3578 =item limit 
     3654=item * limit 
    35793655 
    35803656A number of tags to show. If given, only the first tags as ordered by 
    35813657sort_by and sort_order are shown. 
    35823658 
    3583 =item top 
     3659=item * top 
    35843660 
    35853661A number of tags to show. If given, only the given number of tags with 
     
    38173893=over 4 
    38183894 
    3819 =item max (optional; default "6") 
     3895=item * max (optional; default "6") 
    38203896 
    38213897Allows a user to specify the upper bound of the scale. 
     
    39314007 
    39324008To avoid printing out the leading text when no entry tags are assigned you 
    3933 can use the EntryIfTagged conditional block to first test for entry tags 
    3934 on the entry. You can also use the EntryIfTagged conditional block with 
     4009can use the L<EntryIfTagged> conditional block to first test for entry tags 
     4010on the entry. You can also use the L<EntryIfTagged> conditional block with 
    39354011the tag attribute to test for the assignment of a particular entry tag. 
    39364012 
     
    39394015=over 4 
    39404016 
    3941 =item glue 
     4017=item * glue 
    39424018 
    39434019A text string that is used to join each of the items together. For example: 
    39444020 
    3945     <mt:EntryTags glue=", "><$MTTagName$></mt:EntryTags> 
     4021    <mt:EntryTags glue=", "><$mt:TagName$></mt:EntryTags> 
    39464022 
    39474023would print out each tag name separated by a comma and a space. 
     
    39514027B<Example:> 
    39524028 
    3953 The following code can be used anywhere MTEntries can be used. It prints 
     4029The following code can be used anywhere L<Entries> can be used. It prints 
    39544030a list of all of the tags assigned to each entry returned by L<Entries> 
    39554031glued together by a comma and a space. 
     
    39954071########################################################################### 
    39964072 
     4073=head2 TagLabel 
     4074 
     4075An alias for the 'TagName' tag. 
     4076 
     4077=cut 
     4078 
     4079########################################################################### 
     4080 
    39974081=head2 TagName 
    39984082 
     
    40034087=over 4 
    40044088 
    4005 =item normalize (optional; default "0") 
     4089=item * normalize (optional; default "0") 
    40064090 
    40074091If specified, outputs the "normalized" form of the tag. A normalized 
     
    40114095=over 4 
    40124096 
    4013 =item quote (optional; default "0") 
     4097=item * quote (optional; default "0") 
    40144098 
    40154099If specified, causes any tag with spaces in it to be wrapped in quote 
     
    42294313=over 4 
    42304314 
    4231 =item type 
    4232  
    4233 =item archive_type 
     4315=item * type 
     4316 
     4317=item * archive_type 
    42344318 
    42354319The archive type to test for, case-insensitively. See L<ArchiveType> for 
     
    42764360=over 4 
    42774361 
    4278 =item type or archive_type 
     4362=item * type or archive_type 
    42794363 
    42804364Specifies the name of the archive type you wish to check to see if it is enabled. 
     
    43544438=over 4 
    43554439 
    4356 =item var (optional) 
     4440=item * var (optional) 
    43574441 
    43584442Supplies a variable name to use for assigning the contents of the 
     
    43874471=over 4 
    43884472 
    4389 =item module 
     4473=item * module 
    43904474 
    43914475The name of a template module in the current blog. 
    43924476 
    4393 =item widget 
     4477=item * widget 
    43944478 
    43954479The name of the widget in the current blog to include. 
    43964480 
    4397 =item file 
     4481=item * file 
    43984482 
    43994483The path to an external file on the system. The path can be absolute or 
     
    44024486includes like that found in PHP. 
    44034487 
    4404 =item identifier 
     4488=item * identifier 
    44054489 
    44064490For selecting Index templates by their unique identifier. 
     
    44114495filename to load. 
    44124496 
    4413 =item blog_id (optional) 
     4497=item * blog_id (optional) 
    44144498 
    44154499Used to include a template from another blog in the system. Use in 
    44164500conjunction with the module, widget or identifier attributes. 
    44174501 
    4418 =item global (optional; default "0") 
     4502=item * global (optional; default "0") 
    44194503 
    44204504Forces an Include of a globally defined template even if the 
     
    44224506(For module, widget and identifier includes.) 
    44234507 
    4424 =item ssi (optional; default "0") 
     4508=item * ssi (optional; default "0") 
    44254509 
    44264510If specified, causes the include to be handled as a server-side 
     
    44434527Suitable for module, widget or identifier includes. 
    44444528 
    4445 =item cache (optional; default "0") 
     4529=item * cache (optional; default "0") 
    44464530 
    44474531Enables caching of the contents of the include. Suitable for module, 
    44484532widget or identifier includes. 
    44494533 
    4450 =item key or cache_key (optional) 
     4534=item * key or cache_key (optional) 
    44514535 
    44524536Used to cache the template module. Used in conjunction with the 'cache' 
    44534537attribute. Suitable for module, widget or identifier includes. 
    44544538 
    4455 =item ttl (optional) 
     4539=item * ttl (optional) 
    44564540 
    44574541Specifies the lifetime in seconds of a cached template module. Suitable 
     
    47914875=over 4 
    47924876 
    4793 =item format 
     4877=item * format 
    47944878 
    47954879A required attribute that defines the template with a string of specifiers. 
     
    48014885=over 4 
    48024886 
    4803 =item %a 
     4887=item * %a 
    48044888 
    48054889The entry's author's display name passed through the dirify global filter. Example: melody_nelson 
    48064890 
    4807 =item %-a 
     4891=item * %-a 
    48084892 
    48094893The same as above except using dashes. Example: melody-nelson 
    48104894 
    4811 =item %b 
     4895=item * %b 
    48124896 
    48134897For individual archive mappings, this returns the basename of the entry. By 
     
    48164900entry screen. Example: my_summer_vacation 
    48174901 
    4818 =item %-b 
     4902=item * %-b 
    48194903 
    48204904Same as above but using dashes. Example: my-summer-vacation 
    48214905 
    4822 =item %c 
     4906=item * %c 
    48234907 
    48244908The entry's primary category/subcategory path, built using the category 
    48254909basename field. Example: arts_and_entertainment/tv_and_movies 
    48264910 
    4827 =item %-c 
     4911=item * %-c 
    48284912 
    48294913Same as above but using dashes. Example: arts-and-entertainment/tv-and-movies 
    48304914 
    4831 =item %C 
     4915=item * %C 
    48324916 
    48334917The entry's primary category label passed through the dirify global filter. Example: arts_and_entertainment 
    48344918 
    4835 =item %-C 
     4919=item * %-C 
    48364920 
    48374921Same as above but using dashes. Example: arts-and-entertainment 
    48384922 
    4839 =item %d 
     4923=item * %d 
    48404924 
    484149252-digit day of the month. Example: 09 
    48424926 
    4843 =item %D 
     4927=item * %D 
    48444928 
    484549293-letter language-dependent abbreviation of the week day. Example: Tue 
    48464930 
    4847 =item %e 
     4931=item * %e 
    48484932 
    48494933A numeric entry ID padded with leading zeroes to six digits. Example: 000040 
    48504934 
    4851 =item %E 
     4935=item * %E 
    48524936 
    48534937The entry's numeric ID. Example: 40 
    48544938 
    4855 =item %f 
     493