Changeset 2742
- Timestamp:
- 07/09/08 20:16:36 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
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 { branches/release-41/lib/MT/Template/ContextHandlers.pm
r2728 r2742 1075 1075 ########################################################################### 1076 1076 1077 =head2 string_format 1078 1079 An alias for the 'sprintf' modifier. 1080 1081 =cut 1082 1083 ########################################################################### 1084 1077 1085 =head2 sprintf 1078 1086 … … 1228 1236 =over 4 1229 1237 1230 =item html1238 =item * html 1231 1239 1232 1240 Similar to the 'encode_html' modifier. Escapes special characters as 1233 1241 HTML entities. 1234 1242 1235 =item url1243 =item * url 1236 1244 1237 1245 Similar to the 'encode_url' modifier. Escapes special characters using 1238 1246 a URL-encoded format (ie, " " becomes "%20"). 1239 1247 1240 =item javascript or js1248 =item * javascript or js 1241 1249 1242 1250 Similar to the 'encode_js' modifier. Escapes special characters such … … 1244 1252 in a JavaScript string. 1245 1253 1246 =item mail1254 =item * mail 1247 1255 1248 1256 A very simple email obfuscation technique. … … 1455 1463 ########################################################################### 1456 1464 1465 =head2 TemplateNote 1466 1467 A function tag that always returns an empty string. This tag is useful 1468 for placing simple notes in your templates, since it produces nothing. 1469 1470 B<Example:> 1471 1472 <$mt:TemplateNote note="Hi, mom!"$> 1473 1474 =for tags templating 1475 1476 =cut 1477 1478 ########################################################################### 1479 1480 =head2 Ignore 1481 1482 A block tag that always produces an empty string. This tag is useful 1483 for wrapping template code you wish to disable, or perhaps annotating 1484 sections of your template. 1485 1486 B<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 1500 Returns true if the current publishing context is static publishing, 1501 and false otherwise. 1502 1503 =for tags templating, utility 1504 1505 =cut 1506 1507 ########################################################################### 1508 1509 =head2 IfDynamic 1510 1511 Returns true if the current publishing context is dynamic publishing, 1512 and false otherwise. 1513 1514 =for tags templating, utility 1515 1516 =cut 1517 1518 ########################################################################### 1519 1457 1520 =head2 App:Listing 1458 1521 … … 1526 1589 =over 4 1527 1590 1528 =item type (optional)1591 =item * type (optional) 1529 1592 1530 1593 The C<MT::Object> object type the listing is processing. If unset, 1531 1594 will use the contents of the C<object_type> variable. 1532 1595 1533 =item loop (optional)1596 =item * loop (optional) 1534 1597 1535 1598 The source of data to process. This is an array of hashes, similar … … 1537 1600 variable is used instead. 1538 1601 1539 =item empty_message (optional)1602 =item * empty_message (optional) 1540 1603 1541 1604 Used when there are no rows to output for the listing. If not set, … … 1544 1607 found. 1545 1608 1546 =item id (optional)1609 =item * id (optional) 1547 1610 1548 1611 Used to construct the DOM id for the listing. The outer C<div> tag … … 1551 1614 attribute). 1552 1615 1553 =item listing_class (optional)1616 =item * listing_class (optional) 1554 1617 1555 1618 Provides a custom class name that can be applied to the main … … 1557 1620 that is always applied). 1558 1621 1559 =item action (optional; default 'script_url' variable)1622 =item * action (optional; default 'script_url' variable) 1560 1623 1561 1624 Supplies the 'action' attribute of the C<form> tag produced. 1562 1625 1563 =item hide_pager (optional; default '0')1626 =item * hide_pager (optional; default '0') 1564 1627 1565 1628 Controls whether the pagination controls are shown or not. 1566 1629 If unspecified, pagination is shown. 1567 1630 1568 =item show_actions (optional; default '1')1631 =item * show_actions (optional; default '1') 1569 1632 1570 1633 Controls whether the actions associated with the object type … … 1677 1740 =over 4 1678 1741 1679 =item mode1742 =item * mode 1680 1743 1681 1744 Maps to a '__mode' argument. 1682 1745 1683 =item type1746 =item * type 1684 1747 1685 1748 Maps to a '_type' argument. … … 1741 1804 =over 4 1742 1805 1743 =item bar_position (optional; default "top")1806 =item * bar_position (optional; default "top") 1744 1807 1745 1808 Assigns a CSS class name indicating whether the control is above or 1746 1809 below the listing or edit form it is associated with. 1747 1810 1748 =item hide_pager1811 =item * hide_pager 1749 1812 1750 1813 Assign either 1 or 0 to control whether the pagination controls are 1751 1814 displayed or not. 1752 1815 1753 =item form_id1816 =item * form_id 1754 1817 1755 1818 Associates the pagition controls and item action widget with the … … 1793 1856 =over 4 1794 1857 1795 =item id (optional)1858 =item * id (optional) 1796 1859 1797 1860 If specified, will be used as the 'id' attribute for the outermost C<div> … … 1799 1862 variable instead. 1800 1863 1801 =item label (required)1864 =item * label (required) 1802 1865 1803 1866 The label to display above the widget. 1804 1867 1805 =item label_link (optional)1868 =item * label_link (optional) 1806 1869 1807 1870 If specified, this link will wrap the label for the widget. 1808 1871 1809 =item label_onclick1872 =item * label_onclick 1810 1873 1811 1874 If specified, this JavaScript code will be assigned to the 'onclick' 1812 1875 attribute of a link tag wrapping the widget label. 1813 1876 1814 =item class (optional)1877 =item * class (optional) 1815 1878 1816 1879 If unspecified, will use the id of the widget. This class is included in the 1817 1880 'class' attribute of the outermost C<div> tag for the widget. 1818 1881 1819 =item header_action1820 1821 =item can_close (optional; default "0")1882 =item * header_action 1883 1884 =item * can_close (optional; default "0") 1822 1885 1823 1886 Identifies whether widget may be closed or not. 1824 1887 1825 =item tabbed (optional; default "0")1888 =item * tabbed (optional; default "0") 1826 1889 1827 1890 If specified, the widget will be assigned an attribute that gives it … … 1932 1995 =over 4 1933 1996 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) 1939 2002 1940 2003 Accepted values: "all", "index". 1941 2004 1942 =item can_close (optional; default "1")2005 =item * can_close (optional; default "1") 1943 2006 1944 2007 =back … … 2063 2126 =over 4 2064 2127 2065 =item action (optional)2128 =item * action (optional) 2066 2129 2067 2130 Identifies the URL to submit the form to. If not given, will use 2068 2131 the current application URI. 2069 2132 2070 =item method (optional; default "POST")2133 =item * method (optional; default "POST") 2071 2134 2072 2135 Supplies the C<form> method. "GET" or "POST" are the typical values 2073 2136 for this, but will accept any HTTP-compatible method (ie: "PUT", "DELETE"). 2074 2137 2075 =item object_id (optional)2138 =item * object_id (optional) 2076 2139 2077 2140 Populates a hidden 'id' field in the form. If not given, will also use any 2078 2141 'id' template variable defined. 2079 2142 2080 =item blog_id (optional)2143 =item * blog_id (optional) 2081 2144 2082 2145 Populates a hidden 'blog_id' field in the form. If not given, will also use 2083 2146 any 'blog_id' template variable defined. 2084 2147 2085 =item object_type (optional)2148 =item * object_type (optional) 2086 2149 2087 2150 Populates a hidden '_type' field in the form. If not given, will also use 2088 2151 any 'type' template variable defined. 2089 2152 2090 =item id (optional)2153 =item * id (optional) 2091 2154 2092 2155 Used to form the 'id' element of the HTML C<form> tag. If not specified, … … 2094 2157 determined object_type. 2095 2158 2096 =item name (optional)2159 =item * name (optional) 2097 2160 2098 2161 Supplies the C<form> name attribute. If unspecified, will use the C<id> 2099 2162 attribute, if available. 2100 2163 2101 =item enctype (optional)2164 =item * enctype (optional) 2102 2165 2103 2166 If assigned, sets an 'enctype' attribute on the C<form> tag using the value … … 2175 2238 =over 4 2176 2239 2177 =item id (required)2240 =item * id (required) 2178 2241 2179 2242 A unique identifier for this group of settings. 2180 2243 2181 =item class (optional)2244 =item * class (optional) 2182 2245 2183 2246 If specified, applies this CSS class to the C<fieldset> tag produced. 2184 2247 2185 =item shown (optional; default "1")2248 =item * shown (optional; default "1") 2186 2249 2187 2250 Controls whether the C<fieldset> is initially shown or not. If hidden, … … 2230 2293 =over 4 2231 2294 2232 =item id (required)2295 =item * id (required) 2233 2296 2234 2297 Each application setting tag requires a unique 'id' attribute. This id 2235 2298 should not be re-used within the template. 2236 2299 2237 =item required (optional; default "0")2300 =item * required (optional; default "0") 2238 2301 2239 2302 Controls whether the field is displayed with visual cues that the 2240 2303 field is a required field or not. 2241 2304 2242 =item label2305 =item * label 2243 2306 2244 2307 Supplies the label phrase for the setting. 2245 2308 2246 =item show_label (optional; default "1")2309 =item * show_label (optional; default "1") 2247 2310 2248 2311 Controls whether the label portion of the setting is shown or not. 2249 2312 2250 =item shown (optional; default "1")2313 =item * shown (optional; default "1") 2251 2314 2252 2315 Controls whether the setting is visible or not. If specified, adds … … 2254 2317 setting. 2255 2318 2256 =item label_class (optional)2319 =item * label_class (optional) 2257 2320 2258 2321 Allows an additional CSS class to be applied to the label of the 2259 2322 setting. 2260 2323 2261 =item content_class (optional)2324 =item * content_class (optional) 2262 2325 2263 2326 Allows an addtional CSS class to be applied to the contents of the 2264 2327 setting. 2265 2328 2266 =item hint (optional)2329 =item * hint (optional) 2267 2330 2268 2331 Supplies a "hint" phrase that provides inline instruction to the user. … … 2270 2333 forces it to display. 2271 2334 2272 =item show_hint (optional; default "0")2335 =item * show_hint (optional; default "0") 2273 2336 2274 2337 Controls whether the inline help 'hint' label is shown or not. 2275 2338 2276 =item warning2339 =item * warning 2277 2340 2278 2341 Supplies a warning message to the user regarding the use of this setting. 2279 2342 2280 =item show_warning2343 =item * show_warning 2281 2344 2282 2345 Controls whether the warning message is shown or not. 2283 2346 2284 =item help_page2347 =item * help_page 2285 2348 2286 2349 Identifies a specific page of the MT help documentation for this setting. 2287 2350 2288 =item help_section2351 =item * help_section 2289 2352 2290 2353 Identifies a section name of the MT help documentation for this setting. … … 2408 2471 =over 4 2409 2472 2410 =item var (optional)2473 =item * var (optional) 2411 2474 2412 2475 If assigned, the current 'index' of the loop is assigned to this template 2413 2476 variable. 2414 2477 2415 =item from (optional; default "0")2416 2417 =item start2478 =item * from (optional; default "0") 2479 2480 =item * start 2418 2481 2419 2482 Identifies the starting number for the loop. 2420 2483 2421 =item to2422 2423 =item end2484 =item * to 2485 2486 =item * end 2424 2487 2425 2488 Identifies the ending number for the loop. Either 'to' or 'end' must 2426 2489 be specified. 2427 2490 2428 =item step (optional; default "1")2429 2430 =item increment2491 =item * step (optional; default "1") 2492 2493 =item * increment 2431 2494 2432 2495 Provides the amount to increment the loop counter. 2433 2496 2434 =item glue (optional)2497 =item * glue (optional) 2435 2498 2436 2499 If specified, this string is added inbetween each block of the loop. … … 2442 2505 =over 4 2443 2506 2444 =item __first__2507 =item * __first__ 2445 2508 2446 2509 Assigned 1 when the loop is in the first iteration. 2447 2510 2448 =item __last__2511 =item * __last__ 2449 2512 2450 2513 Assigned 1 when the loop is in the last iteration. 2451 2514 2452 =item __odd__2515 =item * __odd__ 2453 2516 2454 2517 Assigned 1 when the loop index is odd, 0 when it is even. 2455 2518 2456 =item __even__2519 =item * __even__ 2457 2520 2458 2521 Assigned 1 when the loop index is even, 0 when it is odd. 2459 2522 2460 =item __index__2523 =item * __index__ 2461 2524 2462 2525 Holds the current loop index value, even if the 'var' attribute has 2463 2526 been given. 2464 2527 2465 =item __counter__2528 =item * __counter__ 2466 2529 2467 2530 Tracks the number of times the loop has run (starts at 1). … … 2597 2660 =over 4 2598 2661 2599 =item name2600 2601 =item var2662 =item * name 2663 2664 =item * var 2602 2665 2603 2666 Declares a variable to test. When none of the comparison attributes are … … 2605 2668 a "true" value, meaning if it is assigned a non-empty, non-zero value. 2606 2669 2607 =item tag2670 =item * tag 2608 2671 2609 2672 Declares a MT tag to execute; the value of which is used for testing. … … 2613 2676 If tag passes through the logical result of that conditional tag. 2614 2677 2615 =item op2678 =item * op 2616 2679 2617 2680 If specified, applies the specified mathematical operator to the value … … 2621 2684 =over 4 2622 2685 2623 =item + or add2686 =item * + or add 2624 2687 2625 2688 Addition. 2626 2689 2627 =item - or sub2690 =item * - or sub 2628 2691 2629 2692 Subtraction. 2630 2693 2631 =item ++ or inc2694 =item * ++ or inc 2632 2695 2633 2696 Adds 1 to the given value. 2634 2697 2635 =item -- or dec2698 =item * -- or dec 2636 2699 2637 2700 Subtracts 1 from the given value. 2638 2701 2639 =item * or mul2702 =item * * or mul 2640 2703 2641 2704 Multiplication. 2642 2705 2643 =item / or div2706 =item * / or div 2644 2707 2645 2708 Division. 2646 2709 2647 =item % or mod2710 =item * % or mod 2648 2711 2649 2712 Issues a modulus operator. … … 2651 2714 =back 2652 2715 2653 =item value2716 =item * value 2654 2717 2655 2718 Used in conjunction with the 'op' attribute. 2656 2719 2657 =item eq2720 =item * eq 2658 2721 2659 2722 Tests whether the given value is equal to the value of the 'eq' attribute. 2660 2723 2661 =item ne2724 =item * ne 2662 2725 2663 2726 Tests whether the given value is not equal to the value of the 'ne' attribute. 2664 2727 2665 =item gt2728 =item * gt 2666 2729 2667 2730 Tests whether the given value is greater than the value of the 'gt' attribute. 2668 2731 2669 =item lt2732 =item * lt 2670 2733 2671 2734 Tests whether the given value is less than the value of the 'lt' attribute. 2672 2735 2673 =item ge2736 =item * ge 2674 2737 2675 2738 Tests whether the given value is greater than or equal to the value of the 2676 2739 'ge' attribute. 2677 2740 2678 =item le2741 =item * le 2679 2742 2680 2743 Tests whether the given value is less than or equal to the value of the 2681 2744 'le' attribute. 2682 2745 2683 =item like2746 =item * like 2684 2747 2685 2748 Tests whether the given value matches the regex pattern in the 'like' 2686 2749 attribute. 2687 2750 2688 =item test2751 =item * test 2689 2752 2690 2753 Uses a Perl (or PHP under Dynamic Publishing) expression. For Perl, this … … 2969 3032 ########################################################################### 2970 3033 3034 =head2 Unless 3035 3036 A conditional tag that is the logical opposite of the L<If> tag. All 3037 attributes supported by the L<If> tag are also supported for this tag. 3038 3039 =for tags templating 3040 3041 =cut 3042 3043 ########################################################################### 3044 2971 3045 =head2 Loop 2972 3046 … … 2981 3055 =over 4 2982 3056 2983 =item name2984 2985 =item var3057 =item * name 3058 3059 =item * var 2986 3060 2987 3061 The template variable that contains the array of hashref data to 2988 3062 process. 2989 3063 2990 =item sort_by (optional)3064 =item * sort_by (optional) 2991 3065 2992 3066 Causes the data in the given array to be resorted in the manner … … 3000 3074 sort_by="key reverse"; sort_by="value numeric" 3001 3075 3002 =item glue (optional)3076 =item * glue (optional) 3003 3077 3004 3078 If specified, this string will be placed inbetween each "row" … … 3012 3086 =over 4 3013 3087 3014 =item __first__3088 =item * __first__ 3015 3089 3016 3090 Assigned when the loop is in the first iteration. 3017 3091 3018 =item __last__3092 =item * __last__ 3019 3093 3020 3094 Assigned when the loop is in the last iteration. 3021 3095 3022 =item __odd__3096 =item * __odd__ 3023 3097 3024 3098 Assigned 1 when the loop is on odd numbered rows, 0 when even. 3025 3099 3026 =item __even__3100 =item * __even__ 3027 3101 3028 3102 Assigned 1 when the loop is on even numbered rows, 0 when odd. 3029 3103 3030 =item __key__3104 =item * __key__ 3031 3105 3032 3106 When looping over a hashref template variable, this variable is 3033 3107 assigned the key currently in context. 3034 3108 3035 =item __value__3109 =item * __value__ 3036 3110 3037 3111 This variable holds the value of the array or hashref element … … 3138 3212 An alias for the 'Var' tag, and considered deprecated in favor of 'Var'. 3139 3213 3214 =for tags deprecated 3215 3140 3216 =cut 3141 3217 … … 3150 3226 =over 4 3151 3227 3152 =item name (or var)3228 =item * name (or var) 3153 3229 3154 3230 Identifies the template variable. The 'name' attribute supports a variety … … 3175 3251 <mt:Var name="count(foo)"> 3176 3252 3177 =item op3253 =item * op 3178 3254 3179 3255 Along with the 'value' attribute, this allows the application of … … 3181 3257 are supported). 3182 3258 3183 =item value3259 =item * value 3184 3260 3185 3261 If provided with the 'op' attribute, provides the operand for the … … 3190 3266 is useful for setting variables as well. 3191 3267 3192 =item function3268 =item * function 3193 3269 3194 3270 For array template variables, this attribute supports: … … 3196 3272 =over 4 3197 3273 3198 =item pop3274 =item * pop 3199 3275 3200 3276 Takes an element from the end of the array (last element). 3201 3277 3202 =item shift3278 =item * shift 3203 3279 3204 3280 Takes an element from the front of the array (index 0). 3205 3281 3206 =item count3282 =item * count 3207 3283 3208 3284 Returns the number of elements in the array template variable. … … 3214 3290 =over 4 3215 3291 3216 =item delete3292 =item * delete 3217 3293 3218 3294 Only valid when used with the 'key' attribute, or if a key is present 3219 3295 in the variable name. 3220 3296 3221 =item count3297 =item * count 3222 3298 3223 3299 Returns the number of keys present in the hash template variable. … … 3225 3301 =back 3226 3302 3227 =item index3303 =item * index 3228 3304 3229 3305 Identifies an element of an array template variable. 3230 3306 3231 =item key3307 =item * key 3232 3308 3233 3309 Identifies a key of a hash template variable. 3234 3310 3235 =item default3311 =item * default 3236 3312 3237 3313 If the variable is undefined or empty, this value will be output instead. 3238 3314 3239 =item to_json3315 =item * to_json 3240 3316 3241 3317 Formats the variable in JSON notation. 3242 3318 3243 =item glue3319 =item * glue 3244 3320 3245 3321 For array template variables, this attribute is used in joining the … … 3437 3513 =over 4 3438 3514 3439 =item tag or name3515 =item * tag or name 3440 3516 3441 3517 If either 'name' or 'tag' are specified, tests the entry in context … … 3553 3629 =over 4 3554 3630 3555 =item glue3631 =item * glue 3556 3632 3557 3633 A text string that is used to join each of the items together. For example … … 3561 3637 would print out each tag name separated by a comma and a space. 3562 3638 3563 =item type3639 =item * type 3564 3640 3565 3641 The kind of object for which to show tags. By default the entry tags are shown. 3566 3642 3567 =item sort_by3643 =item * sort_by 3568 3644 3569 3645 The tag object column on which to order the tags. Common values are name and 3570 3646 rank. By default tags are sorted by name. 3571 3647 3572 =item sort_order3648 =item * sort_order 3573 3649 3574 3650 The direction in which to sort tags by the sort_by field. Possible values … … 3576 3652 when sorted by name and descending order when sorted by other columns. 3577 3653 3578 =item limit3654 =item * limit 3579 3655 3580 3656 A number of tags to show. If given, only the first tags as ordered by 3581 3657 sort_by and sort_order are shown. 3582 3658 3583 =item top3659 =item * top 3584 3660 3585 3661 A number of tags to show. If given, only the given number of tags with … … 3817 3893 =over 4 3818 3894 3819 =item max (optional; default "6")3895 =item * max (optional; default "6") 3820 3896 3821 3897 Allows a user to specify the upper bound of the scale. … … 3931 4007 3932 4008 To avoid printing out the leading text when no entry tags are assigned you 3933 can use the EntryIfTaggedconditional block to first test for entry tags3934 on the entry. You can also use the EntryIfTaggedconditional block with4009 can use the L<EntryIfTagged> conditional block to first test for entry tags 4010 on the entry. You can also use the L<EntryIfTagged> conditional block with 3935 4011 the tag attribute to test for the assignment of a particular entry tag. 3936 4012 … … 3939 4015 =over 4 3940 4016 3941 =item glue4017 =item * glue 3942 4018 3943 4019 A text string that is used to join each of the items together. For example: 3944 4020 3945 <mt:EntryTags glue=", "><$ MTTagName$></mt:EntryTags>4021 <mt:EntryTags glue=", "><$mt:TagName$></mt:EntryTags> 3946 4022 3947 4023 would print out each tag name separated by a comma and a space. … … 3951 4027 B<Example:> 3952 4028 3953 The following code can be used anywhere MTEntriescan be used. It prints4029 The following code can be used anywhere L<Entries> can be used. It prints 3954 4030 a list of all of the tags assigned to each entry returned by L<Entries> 3955 4031 glued together by a comma and a space. … … 3995 4071 ########################################################################### 3996 4072 4073 =head2 TagLabel 4074 4075 An alias for the 'TagName' tag. 4076 4077 =cut 4078 4079 ########################################################################### 4080 3997 4081 =head2 TagName 3998 4082 … … 4003 4087 =over 4 4004 4088 4005 =item normalize (optional; default "0")4089 =item * normalize (optional; default "0") 4006 4090 4007 4091 If specified, outputs the "normalized" form of the tag. A normalized … … 4011 4095 =over 4 4012 4096 4013 =item quote (optional; default "0")4097 =item * quote (optional; default "0") 4014 4098 4015 4099 If specified, causes any tag with spaces in it to be wrapped in quote … … 4229 4313 =over 4 4230 4314 4231 =item type4232 4233 =item archive_type4315 =item * type 4316 4317 =item * archive_type 4234 4318 4235 4319 The archive type to test for, case-insensitively. See L<ArchiveType> for … … 4276 4360 =over 4 4277 4361 4278 =item type or archive_type4362 =item * type or archive_type 4279 4363 4280 4364 Specifies the name of the archive type you wish to check to see if it is enabled. … … 4354 4438 =over 4 4355 4439 4356 =item var (optional)4440 =item * var (optional) 4357 4441 4358 4442 Supplies a variable name to use for assigning the contents of the … … 4387 4471 =over 4 4388 4472 4389 =item module4473 =item * module 4390 4474 4391 4475 The name of a template module in the current blog. 4392 4476 4393 =item widget4477 =item * widget 4394 4478 4395 4479 The name of the widget in the current blog to include. 4396 4480 4397 =item file4481 =item * file 4398 4482 4399 4483 The path to an external file on the system. The path can be absolute or … … 4402 4486 includes like that found in PHP. 4403 4487 4404 =item identifier4488 =item * identifier 4405 4489 4406 4490 For selecting Index templates by their unique identifier. … … 4411 4495 filename to load. 4412 4496 4413 =item blog_id (optional)4497 =item * blog_id (optional) 4414 4498 4415 4499 Used to include a template from another blog in the system. Use in 4416 4500 conjunction with the module, widget or identifier attributes. 4417 4501 4418 =item global (optional; default "0")4502 =item * global (optional; default "0") 4419 4503 4420 4504 Forces an Include of a globally defined template even if the … … 4422 4506 (For module, widget and identifier includes.) 4423 4507 4424 =item ssi (optional; default "0")4508 =item * ssi (optional; default "0") 4425 4509 4426 4510 If specified, causes the include to be handled as a server-side … … 4443 4527 Suitable for module, widget or identifier includes. 4444 4528 4445 =item cache (optional; default "0")4529 =item * cache (optional; default "0") 4446 4530 4447 4531 Enables caching of the contents of the include. Suitable for module, 4448 4532 widget or identifier includes. 4449 4533 4450 =item key or cache_key (optional)4534 =item * key or cache_key (optional) 4451 4535 4452 4536 Used to cache the template module. Used in conjunction with the 'cache' 4453 4537 attribute. Suitable for module, widget or identifier includes. 4454 4538 4455 =item ttl (optional)4539 =item * ttl (optional) 4456 4540 4457 4541 Specifies the lifetime in seconds of a cached template module. Suitable … … 4791 4875 =over 4 4792 4876 4793 =item format4877 =item * format 4794 4878 4795 4879 A required attribute that defines the template with a string of specifiers. … … 4801 4885 =over 4 4802 4886 4803 =item %a4887 =item * %a 4804 4888 4805 4889 The entry's author's display name passed through the dirify global filter. Example: melody_nelson 4806 4890 4807 =item %-a4891 =item * %-a 4808 4892 4809 4893 The same as above except using dashes. Example: melody-nelson 4810 4894 4811 =item %b4895 =item * %b 4812 4896 4813 4897 For individual archive mappings, this returns the basename of the entry. By … … 4816 4900 entry screen. Example: my_summer_vacation 4817 4901 4818 =item %-b4902 =item * %-b 4819 4903 4820 4904 Same as above but using dashes. Example: my-summer-vacation 4821 4905 4822 =item %c4906 =item * %c 4823 4907 4824 4908 The entry's primary category/subcategory path, built using the category 4825 4909 basename field. Example: arts_and_entertainment/tv_and_movies 4826 4910 4827 =item %-c4911 =item * %-c 4828 4912 4829 4913 Same as above but using dashes. Example: arts-and-entertainment/tv-and-movies 4830 4914 4831 =item %C4915 =item * %C 4832 4916 4833 4917 The entry's primary category label passed through the dirify global filter. Example: arts_and_entertainment 4834 4918 4835 =item %-C4919 =item * %-C 4836 4920 4837 4921 Same as above but using dashes. Example: arts-and-entertainment 4838 4922 4839 =item %d4923 =item * %d 4840 4924 4841 4925 2-digit day of the month. Example: 09 4842 4926 4843 =item %D4927 =item * %D 4844 4928 4845 4929 3-letter language-dependent abbreviation of the week day. Example: Tue 4846 4930 4847 =item %e4931 =item * %e 4848 4932 4849 4933 A numeric entry ID padded with leading zeroes to six digits. Example: 000040 4850 4934 4851 =item %E4935 =item * %E 4852 4936 4853 4937 The entry's numeric ID. Example: 40 4854 4938 4855 =item %f493
