I want to alternate whether HTML code A shows before code B based on a boolean.
Somewhat like:
{if $switch}B A{else}A B{/if}
However, considering A and B are actually long parts of HTML+Smarty code, I don’t want to add them twice for the sake of maintainability.
How would I go about doing that?
Source