IMPROVED: moved template behavior from core into the widget since it will be deprecated in the next version of Wakanda
FIXED: variables found inside {{#if foo }} statements wouldn't be used when rendering the template