Macro content simplified to eliminate other errors.
Macro:
public function getDeliveryAjax($template = 'default') { list( $templateBlock, $templateLineItem, $templateMapItem, $templateJavascript ) = def_module::loadTemplates('emarket/delivery/'.$template, 'delivery_tab_block', 'delivery_line_item', 'delivery_map_item', 'delivery_javascript' ); $block_arr['attribute:delivery_line_items'] = 'text1'; $block_arr['attribute:delivery_map_items'] = 'text2'; $block_arr['attribute:delivery_javascript_items'] = 'text3'; return def_module::parseTemplate($templateBlock, $block_arr); } The default.tpl template is located on the tpls / emarket / delivery / default.tpl path:
<?php $FORMS = Array(); $FORMS['delivery_tab_block'] = <<<END <div> <table class="b-order_delivery"> %delivery_line_items% </table> <table class="b-order_delivery"> %delivery_map_items% </table> <div id="map"> %delivery_javascript_items% </div> </div> END; I launch the link via the browser: http://site.ru/udata/emarket/getDeliveryAjax
At the exit I get:
<udata xmlns:xlink="http://www.w3.org/TR/xlink" delivery_line_items="text1" delivery_map_items="text2" delivery_javascript_items="text3" module="emarket" method="getDeliveryAjax" generation-time="1.222877"/> <!-- This page generated in 2.299103 secs by XSLT, HTTP SCHEME MODE --> How to display macro data with a template?
I do everything on the example of other macros.