<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://help.x-cart.com/index.php?action=history&amp;feed=atom&amp;title=LiteCommerce%3AFlexy_templates_engine</id>
	<title>LiteCommerce:Flexy templates engine - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://help.x-cart.com/index.php?action=history&amp;feed=atom&amp;title=LiteCommerce%3AFlexy_templates_engine"/>
	<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;action=history"/>
	<updated>2026-05-11T06:48:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.5</generator>
	<entry>
		<id>https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;diff=3632&amp;oldid=prev</id>
		<title>Admin: /* Built-in functions */</title>
		<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;diff=3632&amp;oldid=prev"/>
		<updated>2010-02-05T13:27:45Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Built-in functions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 13:27, 5 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l231&quot; &gt;Line 231:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 231:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FLEXY engine provides access to any method call from a method associated with a template. LiteCommerce contains several methods already implemented in the core class Widget and used in the customer and admin zone templates:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FLEXY engine provides access to any method call from a method associated with a template. LiteCommerce contains several methods already implemented in the core class Widget and used in the customer and admin zone templates:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''date_format($date)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/ins&gt;'''date_format($date)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;date_format($base, $field , $format)''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: Formats date with General settings / date format mask or with $format. Returns formatted string.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;date_format($base, $field , $format)'''&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Formats date with General settings / date format mask or with $format. Returns formatted string.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; '''time_format($time), time_format($base, $field, $format)''' : &lt;/ins&gt;Formats date with General settings / date &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;+ time &lt;/ins&gt;format mask or with $format. Returns formatted string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;time_format&lt;/del&gt;($&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;time&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;price_format&lt;/ins&gt;($&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;price&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, price_format&lt;/ins&gt;($base, $field, $&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;thousand_delim, $decimal_delim&lt;/ins&gt;)''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: Formats price with General settings / price format. Returns formatted string,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;time_format&lt;/del&gt;($base, $field, $&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;format&lt;/del&gt;)'''&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Formats date &lt;/del&gt;with &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;General settings / date + time format mask or with $format&lt;/del&gt;. Returns &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;formatted &lt;/del&gt;string.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; '''addSlashes($value), addSlashes($base, $field)''' : Escapes $value of base object field value &lt;/ins&gt;with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;slashes&lt;/ins&gt;. Returns &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;escaped &lt;/ins&gt;string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;price_format&lt;/del&gt;($&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;price)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;split&lt;/ins&gt;($&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;array&lt;/ins&gt;, $&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;count&lt;/ins&gt;)''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: Splits array into pieces with $count values in a piece. Returns array.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;price_format($base, $field, $thousand_delim&lt;/del&gt;, $&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;decimal_delim&lt;/del&gt;)'''&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Formats price with General settings / price format&lt;/del&gt;. Returns &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;formatted string,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; '''percent($count)''' : Calculates percent value of $count&lt;/ins&gt;. Returns &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;decimal.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;addSlashes&lt;/del&gt;($&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;value&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;truncate&lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;&lt;/ins&gt;$&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;baseObject, $field, $length, $etc, $break_words&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, truncate&lt;/ins&gt;($&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;text..&lt;/ins&gt;)''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: Truncates the base object field value or $text to the specified length. Returns truncated string.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;addSlashes&lt;/del&gt;($&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;base, $field&lt;/del&gt;)'''&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Escapes &lt;/del&gt;$&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;value of &lt;/del&gt;base object field value with &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;slashes&lt;/del&gt;. Returns &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;escaped &lt;/del&gt;string.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; '''wrap(&lt;/ins&gt;$&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;object, $prop, $width), wrap($text..)''' : Wraps the &lt;/ins&gt;base object field value &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;or $text &lt;/ins&gt;with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the specified width&lt;/ins&gt;. Returns &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wrapped &lt;/ins&gt;string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;split&lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;$array, $count&lt;/del&gt;)'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;rand&lt;/ins&gt;()''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: Returns randomly generated value (for images fetch, for example). Returns decimal.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Splits array into pieces with &lt;/del&gt;$&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;count values &lt;/del&gt;in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a piece&lt;/del&gt;. Returns &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;array&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; '''isSelected(&lt;/ins&gt;$&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;val1, $val2, $val3)''' : Use this method to check whether the specified value is selected and present &lt;/ins&gt;in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;request&lt;/ins&gt;. Returns &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;boolean&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''percent($count)'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/ins&gt;'''isEmpty(&amp;amp;$data)''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: &lt;/ins&gt;Checks for empty data. Returns boolean.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Calculates percent value of $count. Returns decimal.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''truncate(&amp;amp;$baseObject, $field, $length, $etc, $break_words)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;truncate($text..)'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Truncates the base object field value or $text to the specified length. Returns truncated string.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''wrap($object, $prop, $width)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wrap($text..)'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Wraps the base object field value or $text with the specified width. Returns wrapped string.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''rand()'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Returns randomly generated value (for images fetch, for example). Returns decimal.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''isSelected($val1, $val2, $val3)'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Use this method to check whether the specified value is selected and present in request. Returns boolean.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''isEmpty(&amp;amp;$data)'''&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Checks for empty data. Returns boolean.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 5.2.8 Widgets ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 5.2.8 Widgets ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;diff=3631&amp;oldid=prev</id>
		<title>Admin at 13:25, 5 February 2010</title>
		<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;diff=3631&amp;oldid=prev"/>
		<updated>2010-02-05T13:25:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 13:25, 5 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l73&quot; &gt;Line 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 73:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FLEXY template engine is designed to visualize object properties and these properties and methods can be easily accessed from the template assigned to an object. Generally, every LiteCommerce&amp;#160; Dialog handler has a FLEXY template “main.tpl” assigned (located in the corresponding skins tree, depending on customer or administrator zone). After the Dialog handles a request, it uses the main template to visualize the processing result. The template accesses dialog variables and methods.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FLEXY template engine is designed to visualize object properties and these properties and methods can be easily accessed from the template assigned to an object. Generally, every LiteCommerce&amp;#160; Dialog handler has a FLEXY template “main.tpl” assigned (located in the corresponding skins tree, depending on customer or administrator zone). After the Dialog handles a request, it uses the main template to visualize the processing result. The template accesses dialog variables and methods.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Example &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2.1 &lt;/del&gt;Typical FLEXY template usage '''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Example. Typical FLEXY template usage '''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l123&quot; &gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* {variable:u}&amp;#160; will display urlencode(variable)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* {variable:u}&amp;#160; will display urlencode(variable)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;5.2.5 &lt;/del&gt;Logical operators ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Logical operators ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FLEXY engine supports three logical operands, “Not”, ‘”And” (note that “And” syntax is different from PHP) and “Equal”. These operands can be used in control structures or widget parameters (see “widget” section below).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FLEXY engine supports three logical operands, “Not”, ‘”And” (note that “And” syntax is different from PHP) and “Equal”. These operands can be used in control structures or widget parameters (see “widget” section below).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l149&quot; &gt;Line 149:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 149:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Operand “And” has a higher precedence, so the condition&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Operand “And” has a higher precedence, so the condition &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;!a&amp;amp;b&amp;amp;c&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;will be parsed as &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;!(a&amp;amp;b&amp;amp;b)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/del&gt;!a&amp;amp;b&amp;amp;c&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/nowiki&amp;gt; &lt;/del&gt;will be parsed as&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/del&gt;!(a&amp;amp;b&amp;amp;b)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/nowiki&amp;gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Note|it is strongly recommended that you use method call in template control structures to calculate/combine logical conditions, i.e.}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Note|it is strongly recommended that you use method call in template control structures to calculate/combine logical conditions, i.e.}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l355&quot; &gt;Line 355:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 349:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Note:''' If you’re using FLEXY IF condition inside widget tag, you should use XML-style closing bracket for widget, i.e. &amp;amp;lt;widget IF=”condition” template=”template.tpl”/&amp;amp;gt; FLEXY FOREACH condition is not supported within widget tag!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Note:''' If you’re using FLEXY IF condition inside widget tag, you should use XML-style closing bracket for widget, i.e. &amp;amp;lt;widget IF=”condition” template=”template.tpl”/&amp;amp;gt; FLEXY FOREACH condition is not supported within widget tag!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:LiteCommerce developer guide]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;diff=3630&amp;oldid=prev</id>
		<title>Admin: Created page with '== Overview  ==  LiteCommerce is based on the powerful FLEXY template engine. It allows you to easily separate visual design from program code and to customize the look and feel …'</title>
		<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=LiteCommerce:Flexy_templates_engine&amp;diff=3630&amp;oldid=prev"/>
		<updated>2010-02-05T13:25:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;== Overview  ==  LiteCommerce is based on the powerful FLEXY template engine. It allows you to easily separate visual design from program code and to customize the look and feel …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview  ==&lt;br /&gt;
&lt;br /&gt;
LiteCommerce is based on the powerful FLEXY template engine. It allows you to easily separate visual design from program code and to customize the look and feel of your store using WYSIWUG HTML editors like MS FrontPage and Macromedia Dreamweaver or by hand. Unlike Smarty (http://smarty.php.net/) LiteCommerce FLEXY engine supports template tags incorporated into standard HTML tags.&lt;br /&gt;
&lt;br /&gt;
'''Example 5.1.1 FLEXY using example'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{* This is a FLEXY comment, not displayed in the final output of the template *}&lt;br /&gt;
{* creates a PHP if statement *}&lt;br /&gt;
{if:someCondition}&lt;br /&gt;
&amp;lt;p&amp;gt;There is non-empty condition.&amp;lt;/p&amp;gt;&lt;br /&gt;
{else:}&lt;br /&gt;
&amp;lt;p class=”warning”&amp;gt; condition is empty&amp;lt;/p&amp;gt;&lt;br /&gt;
{end:}&lt;br /&gt;
{* using statement in HTML tag *}&lt;br /&gt;
&amp;lt;p if=”someCondition”&amp;gt; There is non-empty condition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p if=”!someCondition” class=”warning”&amp;gt; condition is empty&amp;lt;/p&amp;gt;&lt;br /&gt;
{* creates PHP foreach statement *}&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr foreach=”arrayOfObjects,index,obj”&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{obj.property1}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{obj.property2}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A set of templates for visualizing LiteCommerce customer and admin zone is called skin. There is also a special mail skin  which is used for mail notifications. Skin templates are organized into a skin tree.&lt;br /&gt;
&lt;br /&gt;
'''Example 5.1.2 LiteCommerce skins tree'''&lt;br /&gt;
&lt;br /&gt;
Litecommerce_root_dir/&lt;br /&gt;
skins_original                      - top level skins directory (source repository)&lt;br /&gt;
skins/                                   - top level skins directory (installed)&lt;br /&gt;
default/                              - default customer zone skin&lt;br /&gt;
en/                                  - default locale (English)&lt;br /&gt;
main.tpl                      -  main template for customer zone&lt;br /&gt;
welcome.tpl&lt;br /&gt;
style.css&lt;br /&gt;
…&lt;br /&gt;
admin/&lt;br /&gt;
en/&lt;br /&gt;
main.tpl                     -  main template for admin zone&lt;br /&gt;
style.css&lt;br /&gt;
categories.tpl&lt;br /&gt;
…&lt;br /&gt;
mail/&lt;br /&gt;
en/&lt;br /&gt;
order_created/           - directory for mail notification&lt;br /&gt;
body.tpl                   - template for mail notification subject&lt;br /&gt;
subject.tpl                - template for mail notification body&lt;br /&gt;
order_processed/&lt;br /&gt;
body.tpl&lt;br /&gt;
subject.tpl&lt;br /&gt;
&lt;br /&gt;
…&lt;br /&gt;
&lt;br /&gt;
It’s possible to switch between LiteCommerce skins by editing etc/config.php configuration file in section “skin_details”.&lt;br /&gt;
&lt;br /&gt;
Compiled templates (resulting PHP code) are stored into the runtime directory var/run/skins. Every template is compiled only once and recompiled after you modify the original template.&lt;br /&gt;
&lt;br /&gt;
== FLEXY templates design ==&lt;br /&gt;
&lt;br /&gt;
=== Basic syntax ===&lt;br /&gt;
&lt;br /&gt;
FLEXY tags can be enclosed within delimiters, { and }, or used within HTML tags, like &amp;lt;p if=”var”&amp;gt;&amp;lt;/p&amp;gt;. FLEXY interpreter parses the found tags info PHP code and displays code output in the place of FLEXY tags.&lt;br /&gt;
&lt;br /&gt;
=== Comments  ===&lt;br /&gt;
&lt;br /&gt;
FLEXY comments are surrounded by asterisks, and the whole expression is surrounded by the delimiter tags like this: {* this is a comment *} Comments are not displayed in the final output of the template. Besides, FLEXY parser does not parse the template code between HTML comments, i.e. &amp;lt;!— This text wont be parsed by FLEXY à, but these comments are included into the final output.&lt;br /&gt;
&lt;br /&gt;
=== Variables and methods ===&lt;br /&gt;
&lt;br /&gt;
FLEXY template engine is designed to visualize object properties and these properties and methods can be easily accessed from the template assigned to an object. Generally, every LiteCommerce  Dialog handler has a FLEXY template “main.tpl” assigned (located in the corresponding skins tree, depending on customer or administrator zone). After the Dialog handles a request, it uses the main template to visualize the processing result. The template accesses dialog variables and methods.&lt;br /&gt;
&lt;br /&gt;
'''Example 5.2.1 Typical FLEXY template usage '''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
// define handler for target “example”&lt;br /&gt;
class Dialog_example extends Dialog&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
var $template = “example.tpl”; //  for customer zone, template skins/default/en/example.tpl will be&lt;br /&gt;
//  used&lt;br /&gt;
&lt;br /&gt;
var $greeting = “&amp;lt;b&amp;gt;Hello, world!&amp;lt;/b&amp;gt;”;&lt;br /&gt;
// define getter method.&lt;br /&gt;
&lt;br /&gt;
function &amp;amp;getGreetingMessage()&lt;br /&gt;
{&lt;br /&gt;
return $this-&amp;gt;greeting;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
// template for target “example”&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example message from dialog property is {greeting:h}&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example message from dialog property is {greeting}&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example message from dialog method is {greetingMessage:h} in short form&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example message from dialog method is {getGreetingMessage():h} in full form&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example message from dialog property is Hello, world!&lt;br /&gt;
Example message from dialog property is &amp;lt;b&amp;gt;Hello, world!&amp;lt;/b&amp;gt;&lt;br /&gt;
Example message from dialog property is Hello, world! in short form&lt;br /&gt;
Example message from dialog property is Hello, world! in full form&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Variable modifiers ===&lt;br /&gt;
&lt;br /&gt;
Variable modifiers can be applied to variables and methods. To apply a modifier, specify one of the available modifiers (h, r, u) after a variable or a method. The variable and modifier must be separated by a colon.&lt;br /&gt;
&lt;br /&gt;
* {variable:h}  will display variable “as is”&lt;br /&gt;
* {variable}     will display htmlspecialchars(variable)&lt;br /&gt;
* {variable:r}   will display variable with quotes “ replaced with &amp;amp;quot;&lt;br /&gt;
* {variable:u}  will display urlencode(variable)&lt;br /&gt;
&lt;br /&gt;
=== 5.2.5 Logical operators ===&lt;br /&gt;
&lt;br /&gt;
FLEXY engine supports three logical operands, “Not”, ‘”And” (note that “And” syntax is different from PHP) and “Equal”. These operands can be used in control structures or widget parameters (see “widget” section below).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| '''Example'''&lt;br /&gt;
| '''Name'''&lt;br /&gt;
| '''Result'''&lt;br /&gt;
|-&lt;br /&gt;
| {if:!a}&lt;br /&gt;
| Not&lt;br /&gt;
| True if variable “a” is not TRUE or NULL or not set&lt;br /&gt;
|-&lt;br /&gt;
| {if:a&amp;amp;b}&lt;br /&gt;
| And&lt;br /&gt;
| True if variable “a” and “b” are TRUE or is not NULL or isset&lt;br /&gt;
|-&lt;br /&gt;
| {if:a=#literal_const#}&lt;br /&gt;
| Equal&lt;br /&gt;
| True if variable “a” is equal to literal constant “literal_const”&lt;br /&gt;
|-&lt;br /&gt;
| {if:a=b}&lt;br /&gt;
| Equal&lt;br /&gt;
| True if variable “a” is equal to variable “b”&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Operand “And” has a higher precedence, so the condition&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;!a&amp;amp;b&amp;amp;c&amp;lt;/nowiki&amp;gt; will be parsed as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;!(a&amp;amp;b&amp;amp;b)&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{{Note|it is strongly recommended that you use method call in template control structures to calculate/combine logical conditions, i.e.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{if:checkCondition} or {if:isCheckCondition()}&lt;br /&gt;
&lt;br /&gt;
function isCheckCondition()&lt;br /&gt;
{&lt;br /&gt;
return $this-&amp;gt;a &amp;amp;&amp;amp; $this-&amp;gt;b;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===  Control structures ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{if:condition[&amp;amp;!=conditions..]}&lt;br /&gt;
{else:}&lt;br /&gt;
{end:}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tag IF=”condition”/&amp;gt;, &amp;lt;tag if=”condition”/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{if} statements in FLEXY have much the same flexibility as PHP if statements, with a few additional features for the template engine. Every {if} must be paired with a closing tab {end:}. {else} statement is also permitted. All FLEXY conditionals are recognized, such as “&amp;amp;”, “!” and “=”.&lt;br /&gt;
&lt;br /&gt;
{{Note| tag IF statement does not support “else” statement.}}&lt;br /&gt;
&lt;br /&gt;
'''Example. If statement'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{if:name}&lt;br /&gt;
Name is {name:h}&lt;br /&gt;
{else:}&lt;br /&gt;
Name is not set&lt;br /&gt;
{end:}&lt;br /&gt;
&lt;br /&gt;
{if:name=#John#}&lt;br /&gt;
Here is John&lt;br /&gt;
{else:}&lt;br /&gt;
{if:!name=##}&lt;br /&gt;
Hello, {name:h}!&lt;br /&gt;
{else:}&lt;br /&gt;
Please, enter your name.&lt;br /&gt;
{end:}&lt;br /&gt;
{end:}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p IF=”name”&amp;gt;Name is {name:h}&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p IF=”!name”&amp;gt;Name is not set&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p IF=”name=#John#”&amp;gt;Here is John&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FLEXY foreach gives an easy way to iterate over arrays. foreach works only on arrays, and will issue an error when you try to use it on a variable with a different data type. If an array is empty or not defined, no output will be produced.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{foreach:array,[index,]element}&lt;br /&gt;
{end:}&lt;br /&gt;
&amp;lt;tag FOREACH=”array,[index,]element&amp;gt;”/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example. Foreach statement'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{foreach:products,pid,product}&lt;br /&gt;
Product name is {product.name:h}&amp;lt;br&amp;gt;&lt;br /&gt;
{end:}&lt;br /&gt;
&amp;lt;table IF=”products”&amp;gt;&lt;br /&gt;
&amp;lt;tr FOREACH=”products,pid,product”&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Product name is is {product.name:h}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|you cannot combine IF and FOREACH statements in one HTML tag, i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;p IF=”condition” FOREACH=”array,elem”/&amp;amp;gt; {* invalid condition *}}}&lt;br /&gt;
&lt;br /&gt;
Please use separate tags for the statements.}}&lt;br /&gt;
&lt;br /&gt;
===Built-in functions===&lt;br /&gt;
&lt;br /&gt;
FLEXY engine provides access to any method call from a method associated with a template. LiteCommerce contains several methods already implemented in the core class Widget and used in the customer and admin zone templates:&lt;br /&gt;
&lt;br /&gt;
'''date_format($date)&lt;br /&gt;
date_format($base, $field , $format)'''&lt;br /&gt;
&lt;br /&gt;
Formats date with General settings / date format mask or with $format. Returns formatted string.&lt;br /&gt;
&lt;br /&gt;
'''time_format($time)&lt;br /&gt;
time_format($base, $field, $format)'''&lt;br /&gt;
&lt;br /&gt;
Formats date with General settings / date + time format mask or with $format. Returns formatted string.&lt;br /&gt;
&lt;br /&gt;
'''price_format($price)&lt;br /&gt;
price_format($base, $field, $thousand_delim, $decimal_delim)'''&lt;br /&gt;
&lt;br /&gt;
Formats price with General settings / price format. Returns formatted string,&lt;br /&gt;
&lt;br /&gt;
'''addSlashes($value)&lt;br /&gt;
addSlashes($base, $field)'''&lt;br /&gt;
&lt;br /&gt;
Escapes $value of base object field value with slashes. Returns escaped string.&lt;br /&gt;
&lt;br /&gt;
'''split($array, $count)'''&lt;br /&gt;
&lt;br /&gt;
Splits array into pieces with $count values in a piece. Returns array.&lt;br /&gt;
&lt;br /&gt;
'''percent($count)'''&lt;br /&gt;
&lt;br /&gt;
Calculates percent value of $count. Returns decimal.&lt;br /&gt;
&lt;br /&gt;
'''truncate(&amp;amp;$baseObject, $field, $length, $etc, $break_words)&lt;br /&gt;
truncate($text..)'''&lt;br /&gt;
&lt;br /&gt;
Truncates the base object field value or $text to the specified length. Returns truncated string.&lt;br /&gt;
&lt;br /&gt;
'''wrap($object, $prop, $width)&lt;br /&gt;
wrap($text..)'''&lt;br /&gt;
&lt;br /&gt;
Wraps the base object field value or $text with the specified width. Returns wrapped string.&lt;br /&gt;
&lt;br /&gt;
'''rand()'''&lt;br /&gt;
&lt;br /&gt;
Returns randomly generated value (for images fetch, for example). Returns decimal.&lt;br /&gt;
&lt;br /&gt;
'''isSelected($val1, $val2, $val3)'''&lt;br /&gt;
&lt;br /&gt;
Use this method to check whether the specified value is selected and present in request. Returns boolean.&lt;br /&gt;
&lt;br /&gt;
'''isEmpty(&amp;amp;$data)'''&lt;br /&gt;
&lt;br /&gt;
Checks for empty data. Returns boolean.&lt;br /&gt;
&lt;br /&gt;
=== 5.2.8 Widgets ===&lt;br /&gt;
&lt;br /&gt;
The basic component of LiteCommerce templates is a widget. Widget has its own attribute “&amp;lt;widget&amp;gt;” that is parsed by FLEXY and can be used only in templates. Combining widgets allows you to build a complex hierarchical visualization without writing a lot of dialog handlers.&lt;br /&gt;
&lt;br /&gt;
'''Example 5.2.4 Using FLEXY widget tag'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{* code below only includes a specified template *}&lt;br /&gt;
&amp;lt;widget template=”welcome.tpl”&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{* code below will include template only for dialog handler “main”, “news” *}&lt;br /&gt;
&amp;lt;widget target=”main,news” template=”footnote.tpl”&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{* code below displays register form dialog *}&lt;br /&gt;
&amp;lt;widget target=&amp;quot;profile&amp;quot; mode=&amp;quot;register&amp;quot; class=&amp;quot;CRegisterForm&amp;quot; template=&amp;quot;common/dialog.tpl&amp;quot; head=&amp;quot;New member&amp;quot; body=&amp;quot;register_form.tpl&amp;quot; name=&amp;quot;registerForm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When used without additional parameters, just with template=”template_file.tpl”, widget always includes the specified template in the place of the &amp;lt;widget&amp;gt; tag after it has been compiled with FLEXY. But the real power of widget is attribute-based behavior. Let us assume that we have two sample dialog pages that interact with a customer, register form and confirmation page. The first page will contain register form and confirmation dialog and the second page will display a register success message. First of all you need to develop two dialog handlers for the targets regform and regsuccess (see section “LiteCommerce request dispatcher” for more details) Both dialogs will have an inherited property template=”main.tpl”. From this main template all other widgets will be included.&lt;br /&gt;
&lt;br /&gt;
'''Example 5.2.5 Main template '''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;widget target=”regform” template=”regform.tpl”&amp;gt;&lt;br /&gt;
&amp;lt;widget target=”regsuccess” template=”regsuccess.tpl”&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we access the “regform” target of the store via the URL cart.php?target=regform, the register form template will be included into output. After a user fills in the register form and submits it, the regform dialog handler uses the form data to create the user’s profile and redirects the customer to register success target with the URL cart.php?target=regsuccess. A confirmation/success template content will be displayed than.&lt;br /&gt;
&lt;br /&gt;
'''Table 5.2.1 Widget tag attributes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| template=”path_to_template.tpl”&lt;br /&gt;
| Specifies the template that will be included for this tag. This field is required.&lt;br /&gt;
|-&lt;br /&gt;
| target=”target[,target[,…]]”&lt;br /&gt;
| The list of static handlers targets to display widget&lt;br /&gt;
|-&lt;br /&gt;
| mode=”mode”&lt;br /&gt;
| Additional static parameters to control widget displaying.&lt;br /&gt;
|-&lt;br /&gt;
| visible=”{condition}”&lt;br /&gt;
| Runtime evaluated condition to control widget displaying.&lt;br /&gt;
|-&lt;br /&gt;
| IF=”condition”&lt;br /&gt;
| Runtime evaluated condition to control widget displaying&lt;br /&gt;
|-&lt;br /&gt;
| class=”ComponentClass”&lt;br /&gt;
| Component class to be used as control class for widget. If component class is specified for widget, widget gets access to all the properties and methods of the component.&lt;br /&gt;
|-&lt;br /&gt;
| name=”name”&lt;br /&gt;
| Name for widget instance (instead of default run-time evaluated) Can be used in a dialog handler to address widget’s components&lt;br /&gt;
|-&lt;br /&gt;
| param=”value”&lt;br /&gt;
&lt;br /&gt;
param1=”{condition}”&lt;br /&gt;
&lt;br /&gt;
…&lt;br /&gt;
&lt;br /&gt;
paramN=…&lt;br /&gt;
| You can pass any additional parameter into widget. Available from template through {widget.param}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you’re using FLEXY IF condition inside widget tag, you should use XML-style closing bracket for widget, i.e. &amp;amp;lt;widget IF=”condition” template=”template.tpl”/&amp;amp;gt; FLEXY FOREACH condition is not supported within widget tag!&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>