Beispiel #1
0
        private void BindContent()
        {
            DefaultArticlePageItem item = Sitecore.Context.Item;

            if (!item.InnerItem.InheritsTemplate(DefaultArticlePageItem.TemplateId) ||
                item.HideMoreLikeThisModule.Checked)
            {
                this.Visible = false;
                return;
            }

            var articles = item.GetMoreLikeThisArticles();

            if (articles.Any())
            {
                rptArticles.DataSource = articles;
                rptArticles.DataBind();
            }
        }