public ActionResult HomePageHero()
        {
            if (Sitecore.Context.Item == null)
            {
                return(null);
            }

            var dataSourceId = Sitecore.Context.Item.ID.ToString();

            Assert.IsNotNullOrEmpty(dataSourceId, "dataSourceId is null or empty");
            var item = Sitecore.Context.Database.GetItem(dataSourceId);

            if (item == null)
            {
                return(null);
            }

            HomepageModel.Homepage homePageModel = new HomepageModel.Homepage();

            //Multilist
            MultilistField heroListField = item.Fields[Templates.HomepageHero.Fields.HomepageHeroList];

            homePageModel.HeroSlides = PopulateHeroList(heroListField);


            return(View(homePageModel));
        }
        public ActionResult BestRecipes()
        {
            if (Sitecore.Context.Item == null)
            {
                return(null);
            }

            var dataSourceId = Sitecore.Context.Item.ID.ToString();

            Assert.IsNotNullOrEmpty(dataSourceId, "dataSourceId is null or empty");
            var item = Sitecore.Context.Database.GetItem(dataSourceId);

            if (item == null)
            {
                return(null);
            }

            HomepageModel.Homepage homePageModel = new HomepageModel.Homepage();

            homePageModel.BestRecipesTitle = item.Fields[Templates.BestRecipes.Fields.BestRecipesTitle.ToString()].Value;


            //Multilist
            MultilistField bestRecipesListField = item.Fields[Templates.BestRecipes.Fields.BestRecipesList];

            Item[]        bestRecipesListItems = bestRecipesListField.GetItems();
            List <Recipe> recipes = new List <Recipe>();

            if (bestRecipesListItems != null && bestRecipesListItems.Count() > 0)
            {
                foreach (Item recipeListItem in bestRecipesListItems)
                {
                    Recipe recipe     = new Recipe();
                    Item   recipeItem = Sitecore.Context.Database.GetItem(recipeListItem.ID);
                    recipe.RecipeName = recipeItem.Fields[Templates.Recipe.Fields.RecipName.ToString()].Value;


                    recipe.RecipeAbscractText = recipeItem.Fields[Templates.Recipe.Fields.RecipeAbscractText.ToString()].Value;

                    ImageField recipeImage = recipeItem.Fields[Templates.Recipe.Fields.RecipeAbscractImage];
                    if (recipeImage != null && recipeImage.MediaItem != null)
                    {
                        recipe.RecipeAbscractImageUrl = Sitecore.Resources.Media.MediaManager.GetMediaUrl(recipeImage.MediaItem);
                    }


                    recipe.RecipeURL = Sitecore.Links.LinkManager.GetItemUrl(recipeItem);
                    int rating = 0;
                    int.TryParse(recipeItem.Fields[Templates.Recipe.Fields.RecipeRating.ToString()].Value, out rating);
                    recipe.RecipeRating = rating;
                    //hero.HeroBackgroundImageUrlAlt = heroImage.Alt;

                    recipes.Add(recipe);
                }
            }

            homePageModel.BestRecipesList = recipes;

            return(View(homePageModel));
        }