Use a {% switch %} tag when looping through the block types