fixed vertical slide support

Fixed vertical slide code in template.