Several times I've wanted to exit a MACRO early if some condition is met. I keep thinking RETURN will do this, but it exits the template, not the macro. I guess that works if the macro is in its own template, but many times I have a macro that exists only in the template that uses it.
I'm looking for something like this:
MACRO output_section( value ) BLOCK;
IF value == 0;
# display short amount of html for special case
EXIT; # exit this macro/block
END;
# display lots of html for section
END;
# display main html
output_section( 4 );
output_section( 0 );
Several times I've wanted to exit a MACRO early if some condition is met. I keep thinking RETURN will do this, but it exits the template, not the macro. I guess that works if the macro is in its own template, but many times I have a macro that exists only in the template that uses it.
I'm looking for something like this: