From 31c9e98c7dba5675fbf21038b738ff937d4d96f7 Mon Sep 17 00:00:00 2001 From: Andy Adiwidjaja Date: Wed, 14 Mar 2012 16:54:52 +0100 Subject: [PATCH] Correction of template documentation: Removed mentions of deprecated control statement. --- docs/en/reference/templates.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/en/reference/templates.md b/docs/en/reference/templates.md index fbdd4fabb..189223203 100644 --- a/docs/en/reference/templates.md +++ b/docs/en/reference/templates.md @@ -217,25 +217,25 @@ $Modulus and $MultipleOf can help to build column layouts. $Modulus(value, offset) // returns an int $MultipleOf(factor, offset) // returns a boolean. -The following example demonstrates how you can use $Modulus(4) to generate custom column names based on your control statement. Note that this works for any control statement (not just children) +The following example demonstrates how you can use $Modulus(4) to generate custom column names based on your loop statement. Note that this works for any control statement (not just children) :::ss - <% control Children %> + <% loop Children %>
...
- <% end_control %> + <% end_loop %> Will return you column-3, column-2, column-1, column-0, column-3 etc. You can use these as styling hooks to float, position as you need. You can also use $MultipleOf(value, offset) to help build columned layouts. In this case we want to add a
after every 3th item :::ss - <% control Children %> + <% loop Children %> <% if MultipleOf(3) %>
<% end_if %> - <% end_control %> + <% end_loop %> ## Scope @@ -352,9 +352,9 @@ Your function could return a single value as above or it could be a subclass of And now you could call these values by using :::ss - <% control MyCustomValues %> + <% with MyCustomValues %> $Hi , $Name - <% end_control %> + <% end_with %> // output "Kia Ora , John Smith"