appypod-rattail/gen/ui/callMacro.pt

17 lines
886 B
Plaintext
Raw Normal View History

<tal:comment replace="nothing">
This page allows to call any macro from Python code, for example.
</tal:comment>
<tal:call tal:define="macroName options/macroName;
page python: options['page'];
contextObj python: options['contextObj'];
2011-09-18 08:00:05 -05:00
tool contextObj/getTool;
layoutType python:'view';
lang tool/getUserLanguage;
dir python: tool.getLanguageDirection(lang);
dleft python: (dir == 'ltr') and 'left' or 'right';
dright python: (dir == 'ltr') and 'right' or 'left';
phaseInfo python: contextObj.getAppyPhases(currentOnly=True, layoutType='view');
phase phaseInfo/name;">
<metal:callMacro use-macro="python: page.macros[macroName]"/>
</tal:call>