improve template content hooks