<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://limb.nohau.ru/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://limb.nohau.ru/feed.php">
        <title>Фремворк Limb - limb3:en:packages:macro</title>
        <description></description>
        <link>https://limb.nohau.ru/</link>
        <image rdf:resource="https://limb.nohau.ru/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-11-10T16:18:31+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:compiler&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:data_sources&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:dictionaries&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:errors_and_debug&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:expressions&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:filters_intro&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:form_tags&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:how_to_create_new_filter&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:how_to_create_new_tag&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:important_details&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:intro&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:list_tags&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:pagination&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:php_code_in_templates&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:pros_and_cons&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:tags_info&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:tags_intro&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:template_composition&amp;rev=1289372570&amp;do=diff"/>
                <rdf:li rdf:resource="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:template_file_name_resolving&amp;rev=1289372570&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://limb.nohau.ru/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Фремворк Limb</title>
        <link>https://limb.nohau.ru/</link>
        <url>https://limb.nohau.ru/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:compiler&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>{{macro}} compiler</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:compiler&amp;rev=1289372570&amp;do=diff</link>
        <description>{{macro}} compiler

This page is essential for developers who want to create their own {{macro}} tags or filters. After reading this page you will have a better understanding of the {{macro}} templates compilation process. 

It is considered that you have already read the</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:data_sources&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>How {{macro}} template gets data for displaying?</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:data_sources&amp;rev=1289372570&amp;do=diff</link>
        <description>How {{macro}} template gets data for displaying?

{{macro}} usually works with plain PHP scalar values or arrays. However, if you want your objects to be fully supported in {{macro}} as well, make sure that your object supports ArrayAccess(in case of accessing attributes using dotted syntax) or</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:dictionaries&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Where {{macro}} looks for tags and filters</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:dictionaries&amp;rev=1289372570&amp;do=diff</link>
        <description>Where {{macro}} looks for tags and filters

Dictionaries

 supports only tags and filters that are registered in special dictionaries:

	*  tags dictionary,
	*  filters dictionary

 searches tags in:

	*  limb/macro/src/tags - by default
	*  limb/*/src/macro and src/macro of your Limb3-based application in case of using VIEW package.</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:errors_and_debug&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>{{macro}} error messages and templates debugging</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:errors_and_debug&amp;rev=1289372570&amp;do=diff</link>
        <description>{{macro}} error messages and templates debugging

Template compilation errors

{{macro}} compiler can detect the most of errors in templates.

Here is the list of errors that are considered to be fatal for a {{macro}} template:

	*  Unbalanced template, that has an opening tag in one template and does not have a corresponding closing tag in the same template file(in case if this tag requires a closing tag).</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:expressions&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Expressions. How to render variable values in templates</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:expressions&amp;rev=1289372570&amp;do=diff</link>
        <description>Expressions. How to render variable values in templates

Expressions syntax

Expressions - are special entities of  template that have two main functions:

	*  to render variables (in such cases expressions are called output expressions):
		*  {$percentage} - renders a variable from local data scope. Same as &lt;?php echo $percentage; ?&gt;</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:filters_intro&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Filters. How to modify or format data on rendering.</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:filters_intro&amp;rev=1289372570&amp;do=diff</link>
        <description>Filters. How to modify or format data on rendering.

Filters are used to modify or to apply some special formatting rules to variables in expressions. Filters are separated from other  parts of an expression by vertical line. Several filters can be combined into a</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:form_tags&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Forms and form elements</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:form_tags&amp;rev=1289372570&amp;do=diff</link>
        <description>Forms and form elements

{{macro}} has basic aids to auto populate form fields with previously sent data. There are also tags for generating &lt;select&gt; tags with options and for rendering validation errors.

Here is the list of the most commonly used {{macro}}</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:how_to_create_new_filter&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>How to create your own {{macro}} filters</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:how_to_create_new_filter&amp;rev=1289372570&amp;do=diff</link>
        <description>How to create your own {{macro}} filters

 filters are stored in files with .filter.php suffix in file name. Filters files can be found in limb/macro/src/filters/ folder and also in src/macro folders of Limb3 packages and Limb-based applications.

Filters core classes</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:how_to_create_new_tag&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>How to create your own {{macro}} tags</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:how_to_create_new_tag&amp;rev=1289372570&amp;do=diff</link>
        <description>How to create your own {{macro}} tags

It is considered that you have already read this two pages:

	*  &quot;{{macro}} compilation and rendering. How to run {{macro}} template.&quot;,
	*  {{macro}} compiler,

{{macro}} tags are stored in files with .tag.php suffix in file name. Tags files can be found in limb/macro/src/tags/ folder and also in src/macro folders of Limb3 packages and Limb-based applications.</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:important_details&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>{{macro}} compilation and rendering. How to run {{macro}} template.</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:important_details&amp;rev=1289372570&amp;do=diff</link>
        <description>{{macro}} compilation and rendering. How to run {{macro}} template.

Compile time vs run time

 is a PHP compiling template engine, which basically means that  creates PHP code while parsing the template markup. Generated PHP code is cached onto the disk, then it is included and executed. Since generated PHP code is cached, this provides</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:intro&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Introduction to {{macro}}. {{macro}} templates syntax and entities.</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:intro&amp;rev=1289372570&amp;do=diff</link>
        <description>Introduction to {{macro}}. {{macro}} templates syntax and entities.

This page demonstrates a simple example of {{macro}} template and covers briefly {{macro}} syntax and template entities like tags, output expressions and filters.

{{macro}} template example</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:list_tags&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Rendering lists or tables</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:list_tags&amp;rev=1289372570&amp;do=diff</link>
        <description>Rendering lists or tables

{{macro}} tags for lists rendering

Let's consider the following example:


 &lt;table border=&quot;1&quot;&gt;
   &lt;tr&gt;
    &lt;th&gt;№&lt;/th&gt;
    &lt;th&gt;Title&lt;/th&gt;
    &lt;th&gt;Volume, liters&lt;/th&gt;
    &lt;th&gt;Weight, kg&lt;/th&gt;
   &lt;/tr&gt;
 {{list using=&quot;$#tanks&quot; as=&quot;$tank&quot; counter=&quot;$number&quot;}}
   {{list:item}}
   &lt;tr&gt;
    &lt;td&gt;{$number}&lt;/td&gt;
    &lt;td&gt;{$tank.name}&lt;/td&gt;
    &lt;td&gt;{$tank.volume}&lt;/td&gt;
    &lt;td&gt;{$tank.weight}&lt;/td&gt;
   &lt;/tr&gt;
   {{/list:item}}
  {{list:empty}}
  &lt;tr&gt;&lt;td colspan='4'&gt;List is empty!&lt;/td&gt;&lt;/tr…</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:pagination&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Rendering lists with pagers. Pagination</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:pagination&amp;rev=1289372570&amp;do=diff</link>
        <description>Rendering lists with pagers. Pagination

In most cases lists are too long to be displayed on a single page. In such cases lists are usually spllited(paginated) into many small pages.

Pager - is a bunch of links that allow visitors to jump to other pages of displayed list. Pager may come in different forms: it can be just two links</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:php_code_in_templates&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Using PHP code in {{macro}} templates</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:php_code_in_templates&amp;rev=1289372570&amp;do=diff</link>
        <description>Using PHP code in {{macro}} templates

As you may know {{macro}} compiles initial templates into a regular PHP class. That's why you can insert any PHP blocks into {{macro}} templates, e.g.:


 &lt;select name='my_selector'&gt;
  &lt;?php 
   foreach($this-&gt;items as $item) 
   {
     echo '&lt;option value=&quot;'. $item['value'] . '&quot; ';
      if(some_condition())
       echo 'selected';
     echo '&gt;'. $item['title'] .'&lt;/option&gt;';
   }
  ?&gt;
 &lt;/select&gt;</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:pros_and_cons&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Pros and cons of MACRO template engine</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:pros_and_cons&amp;rev=1289372570&amp;do=diff</link>
        <description>Pros and cons of MACRO template engine

Pros

	*  MACRO has powerful tools for templates composition such as wrapping, including, reusing, multiple wrapping. We really don't know any other template engine that offers the same capabilities.

	*  MACRO is a</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:tags_info&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>{{macro}} tags</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:tags_info&amp;rev=1289372570&amp;do=diff</link>
        <description>{{macro}} tags

Tags - are the main control elements of {{macro}} templates. 

Tags commonly have a closing tag (e.g list or wrap), but there also tags that don't have a closing tag(e.g slot).

Tags annotations

Tags can be found in *.tag.php files in limb/macro/src/tags and in /src/macro folders of your packages. In the header of each tag file there are</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:tags_intro&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Tags</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:tags_intro&amp;rev=1289372570&amp;do=diff</link>
        <description>Tags

Tags - are elements of {{macro}} template that generates PHP code (in most cases).

Tags can have a short form like {{tag_name attrr1='value1'...att2='valueM'/}} and a full form with opening and closing tags {{tag_name attr1='value1'...attr2='valueM'}}</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:template_composition&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Templates composition (including, wrapping and reusing)</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:template_composition&amp;rev=1289372570&amp;do=diff</link>
        <description>Templates composition (including, wrapping and reusing)

{{macro}} has a rich set of tools for template composition, these are:

	*  Including - inserting the content of some other template into the current template
	*  Wrapping - wrapping a part or the whole content of the current template into some particular place(so called</description>
    </item>
    <item rdf:about="https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:template_file_name_resolving&amp;rev=1289372570&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-11-10T07:02:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>How {{macro}} searches template files by aliases?</title>
        <link>https://limb.nohau.ru/doku.php?id=limb3:en:packages:macro:template_file_name_resolving&amp;rev=1289372570&amp;do=diff</link>
        <description>How {{macro}} searches template files by aliases?

 can work both with absolute template file paths and aliases(relative ones):

	*  /var/dev/project/template/news.phtml - absolute path
	*  news.phtml - an alias

 resolves aliases using template locator</description>
    </item>
</rdf:RDF>
