add caption to template; add function to add portrait/landscape class