private void FillCarousel(long carouselContentId) { ContentTypeManager<Carousel> carouselManager = new ContentTypeManager<Carousel>(); ContentType<Carousel> carouselItem = carouselManager.GetItem(carouselContentId, false); if (carouselItem != null) { lstThumbnailIcon.DataSource = carouselItem.SmartForm.CarouselItem; lstThumbnailIcon.DataBind(); lstSliderFigure.DataSource = carouselItem.SmartForm.CarouselItem; lstSliderFigure.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (ContentId != 0) { ContentTypeManager<NewDevTraining.News> newsManager = new ContentTypeManager<News>(); ContentType<News> newsContent = newsManager.GetItem(ContentId, false); if (newsContent != null) { NewsTitle = newsContent.SmartForm.Title; NewsDate = newsContent.SmartForm.Date; NewsBodyText = newsContent.SmartForm.FullDescription.ToString(); } } }
private List <ContentType <Attraction> > populateMerchandise(string title, int paging) { // IntegerPropertyExpression sfid = new IntegerPropertyExpression(smartFormID); // id = current page id to exclude from query results // parameters = current page query string // title = title of current page // contentBlockId = id of content block on current page to exclude from query results IEnumerable <QueryResult> results = new List <QueryResult>(); KeywordSearchCriteria criteria = new KeywordSearchCriteria(); criteria.QueryText = title; criteria.ImplicitAnd = false; criteria.OrderBy = new List <OrderData>() { new OrderData(SearchContentProperty.Rank, OrderDirection.Descending) }; criteria.ExpressionTree = QueryProperties.Id > 0 & QueryProperties.SFID.EqualTo(9); criteria.PagingInfo = new PagingInfo(paging); criteria.PagingInfo.CurrentPage = 1; criteria.ReturnProperties = new HashSet <PropertyExpression>() { SearchContentProperty.Id, SearchContentProperty.Title, SearchContentProperty.QuickLink, SearchContentProperty.Description }; ISearchManager manager = ObjectFactory.GetSearchManager(); SearchResponseData response = manager.Search(criteria); List <ContentType <Attraction> > merchandiseList = new List <ContentType <Attraction> >(); if (response.Results.Count > 0) { results = GetResults(response); foreach (Content.QueryResult merchandise in results) { ContentTypeManager <Attraction> contentTypeManagerAttraction = new ContentTypeManager <Attraction>(); ContentType <Attraction> cd = contentTypeManagerAttraction.GetItem(merchandise.Id); merchandiseList.Add(cd); } } return(merchandiseList); }
protected void Page_Load(object sender, EventArgs e) { if (ContentId != 0) { ContentTypeManager<HolidayOffers> offerManager = new ContentTypeManager<HolidayOffers>(); ContentType<HolidayOffers> holidayContent = offerManager.GetItem(ContentId, false); if (holidayContent != null) { Title = holidayContent.SmartForm.Title; Date = holidayContent.Content.DateCreated.ToLongDateString(); BodyText = holidayContent.SmartForm.BodyText.ToString(); ImgSource = holidayContent.SmartForm.ImgSource; } } }