macro supports only tags and filters that are registered in special dictionaries:
macro searches tags in:
macro searches filters in:
macro processes only the certain kind of files:
As a rule, dictionaries are filled once only and then cached. Dictionaries cache files can be found in var/compiled folder of your application. If you create a new macro tag, just remove dictionaries cache files and macro will find your new tag on next template compilation.
In the head of each macro tag or filter file there is an annotation block that hold some essential meta information, like tag or filter name or aliases, required attributes, etc. Let's take a look at empty tag file (limb/macro/src/tags/list/list_empty.tag.php):
/** * Empty List tag for a list which failed to have any contents * @tag list:empty * @aliases list:default * @parent_tag_class lmbMacroListTag * @package macro * @version $Id$ */ class lmbMacroListEmptyTag extends lmbMacroTag { }
@tag, @req_attributes, @forbig_end_tag - are annotations:
The complete list of annotations for tags and filters see at How to create your own tags and How to create your own filters.
Обсуждение