5.5.2 <al-usearg>

The <al-usearg> tag is used inside a macro definition to define the location where content enclosed by the <al-expand> (5.5.4) tag should be placed when the macro is expanded.

All content enclosed by the <al-expand> tag is passed to the macro as the unnamed argument. The unnamed argument is retrieved in the macro definition by using an <al-usearg> tag without specifying a name (5.5.2.1) attribute. When a macro expects only one argument it is best to use this mechanism.

>>> import albatross
>>> ctx = albatross.SimpleContext('.')
>>> albatross.Template(ctx, '<magic>', '''
... <al-macro name="double">
...  1. <al-usearg>
...  2. <al-usearg>
... </al-macro>
... ''').to_html(ctx)
>>> ctx.flush_content()
>>> albatross.Template(ctx, '<magic>', '''
... <al-expand name="double">
...  spam
... </al-expand>''').to_html(ctx)
>>> ctx.flush_content()
1. spam
2. spam



Subsections