Added function exists checks around the template functions, could also be defined in Orbis theme.