コード例 #1
0
        /// <summary>
        /// Top Banner.
        /// </summary>
        /// <returns></returns>
        public ActionResult GetTopBannerItem()
        {
            IBannerModel model = null;

            if (CurrentItem.TemplateID.ToString().Equals(Templates.BannerModel.TemplateIdString))
            {
                model = _bannerRepository.GetBannerItems(CurrentItem);

                foreach (ICTA CTA in model.CTATitle)
                {
                    //Get Associated goal's from CTA
                    CTA.TrackingID = ItemExtensions.GetEventDefinition(Sitecore.Context.Database.GetItem(CTA.Id.ToString()));
                }
            }
            return(PartialOrEmpty(Constants.Views.TopBannerView, model));
        }