2011-01-28 07:36:30 -06:00
|
|
|
<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;
|
2011-01-28 07:36:30 -06:00
|
|
|
layoutType python:'view';
|
2012-07-03 08:00:45 -05:00
|
|
|
lang tool/getUserLanguage;
|
|
|
|
dir python: tool.getLanguageDirection(lang);
|
|
|
|
dleft python: (dir == 'ltr') and 'left' or 'right';
|
|
|
|
dright python: (dir == 'ltr') and 'right' or 'left';
|
2011-01-28 19:18:14 -06:00
|
|
|
phaseInfo python: contextObj.getAppyPhases(currentOnly=True, layoutType='view');
|
|
|
|
phase phaseInfo/name;">
|
2011-01-28 07:36:30 -06:00
|
|
|
<metal:callMacro use-macro="python: page.macros[macroName]"/>
|
|
|
|
</tal:call>
|