/// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public List <CmsTemplateModel> GetAvailableTemplates()
        {
            var availableTemplates = MappingRepository.GetAvailableCmsTemplates();

            if (availableTemplates.Count == 0)
            {
                throw new Exception("Template folder is empty");
            }
            var templates = MapCmsTemplates(availableTemplates).ToList();

            return(templates);
        }
        public List <CmsTemplateModel> GetAvailableTemplates()
        {
            var availableTemplates = MappingRepository.GetAvailableCmsTemplates();

            if (availableTemplates.Count == 0)
            {
                Log.Warn("Template folder is empty", this);
                return(new List <CmsTemplateModel>());
            }
            var templates = MapCmsTemplates(availableTemplates).ToList();

            return(templates);
        }