The } template should be placed at the top of the portal page, not within a table or another template, due to template limits.