[%- GLOBAL_DEBUG = ctx.debug; MACRO loc(text, args) BLOCK; ctx.localize(text, args); END; MACRO include(name, args) BLOCK; filename = ${name}; IF filename; IF GLOBAL_DEBUG; '\n"; END; INCLUDE $filename args; IF GLOBAL_DEBUG; '\n"; END; ELSE; error = 'Chosen INCLUDE ' _ name _ ' is empty'; THROW file error; END; END; MACRO connect_form(vp, event) BLOCK; ''; END; MACRO connect_control(vp, event, value) BLOCK; 'name="'; vp.event_id_for(event); '"'; END; MACRO connect_href(vp, events) BLOCK; FOREACH event = events.keys; evt_args.${vp.event_id_for(event)} = events.$event; END; 'href="'; ctx.req.uri_with(evt_args); '"'; END; UNLESS type; errmsg = "type is empty rendering " _ self; THROW file errmsg; END; PROCESS $type; IF GLOBAL_DEBUG; '\n"; END; include( 'main_block' ); IF GLOBAL_DEBUG; '\n"; END; -%]