]> git.andy128k.dev Git - ipf.git/commitdiff
style doc
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 16 Jun 2013 18:58:20 +0000 (21:58 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 16 Jun 2013 18:58:20 +0000 (21:58 +0300)
doc/template.org

index 3171e2f89e2af88d3473a9ad58a4b68c53b224db..796ba8242f2b5be973a35c529a63eeca1aa2266e 100644 (file)
@@ -6,24 +6,24 @@
     Outputs expression.
 
 *** {if <condition>} | {elseif <condition>} | {else} | {/if}
-
+    
 *** {while <condition>} | {/while}
 
 *** {foreach <collection> as [<key> =>] <value>} | {/foreach}
     Iterate over collection.
     Following variables are defined inside a loop:
-    foreach_counter0 -- zero based iteration counter
-    foreach_counter1 -- unit based iteration counter
-    foreach_first -- is true on first iteration and false on the rest ones.
+    + =foreach_counter0= -- zero based iteration counter
+    + =foreach_counter1= -- unit based iteration counter
+    + =foreach_first= -- is true on first iteration and false on the rest ones.
 
 *** {assign <var> <eq-op> <expr>}
-    Example: {assing $v += 1}
+    Example: ={assing $v += 1}=
 
 *** {literal} | {/literal}
     Literally output enclosed text. Mostly used to wrap inlined JavaScript.
 
 *** {include "<filename>"}
-    Include another template. Example: {include "pagination.html"}
+    Include another template. Example: ={include "pagination.html"}=
 
 *** {block <name>} | {superblock} | {/block}
 
    Modifier is a transformation applied to a printed value.
    Some modifiers have one or more parameters.
 
-   {<expr> [|<modifier>[:<params>]]*}
+   ={<expr> [|<modifier>[:<params>]]*}=
 
-   Where <params> is a comma-separated list of parameters.
+   Where =<params>= is a comma-separated list of parameters.
 
-   Examples: {$content|safe}, {$content|strip_tags|limit_words:10}
+   Examples: ={$content|safe}=, ={$content|strip_tags|limit_words:10}=
 
 *** Predefined modifiers
 
-    upper
-    lower
-    capitalize
-    trim
+    + =upper=
+    + =lower=
+    + =capitalize=
+    + =trim=
 
-    limit_words:<count>,<end> -- Limits text to specified number of words (default is 100). Text is terminted by <end> string (default is ellipsis character).
+    + =limit_words:<count>,<end>= -- Limits text to specified number of words (default is 100). Text is terminted by <end> string (default is ellipsis character).
 
-    date:<format> -- format date. Default format is '%b %e, %Y'
-    time:<format> -- format date and time. Default format is 'Y-m-d H:i:s'
+    + =date:<format>= -- format date. Default format is '%b %e, %Y'
+    + =time:<format>= -- format date and time. Default format is 'Y-m-d H:i:s'
 
-    floatformat:<decimals>,<point><thousands> -- format float value. Default parameters are 2, '.', ','.
+    + =floatformat:<decimals>,<point><thousands>= -- format float value. Default parameters are 2, '.', ','.
 
-    count -- number of elements in collection
+    + =count= -- number of elements in collection
 
-    escxml -- escape XM
-    escape -- escape HTML
-    escurl -- escape URL
-    strip_tags -- remove all tags
-    nl2br -- replaces all new line characters with '<br>' tags
-    unsafe, safe -- outputs text unescaped
+    + =escxml= -- escape XM
+    + =escape= -- escape HTML
+    + =escurl= -- escape URL
+    + =strip_tags= -- remove all tags
+    + =nl2br= -- replaces all new line characters with '<br>' tags
+    + =unsafe=, =safe= -- outputs text unescaped
 
-    debug -- print_r
-    fulldebug -- var_export
+    + =debug= -- print_r
+    + =fulldebug= -- var_export
 
 ** Configuration
 
-   template_tags -- additional template tags
-
-   template_modifiers -- additional template modifiers
-
-   template_context_processors -- list of context processors
-
-   template_dirs -- list of directories to look for template files. By default it contains 'templates' folder in project directory and 'templates' folder in IPF_Admin application (when it is enabled).
-
-   debug -- forces to recompile template before each rendering
+   + =template_tags= -- additional template tags
+   + =template_modifiers= -- additional template modifiers
+   + =template_context_processors= -- list of context processors
+   + =template_dirs= -- list of directories to look for template files. By default it contains 'templates' folder in project directory and 'templates' folder in IPF_Admin application (when it is enabled).
+   + =debug= -- forces to recompile template before each rendering