Added check in tpl that content exists