November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
http://localhost:50099/Default.aspx
i want in above link Announcements & Events how to display child pages images in parent page tell me guys
PageData pdAnnouncements = GetPage(pgrefAnnouncements);
PageDataCollection rootBanner = GetChildren(pgrefAnnouncements);
DateTime dtExpiryDate;
foreach (PageData pd in rootBanner)
{
dtExpiryDate = Convert.ToDateTime(pd["ExpiryDate"]);
if (dtExpiryDate == DateTime.MinValue)
{
dtExpiryDate = DateTime.Now;
}
if ((System.DateTime.Now > pd.StartPublish) && (System.DateTime.Now < pd.StopPublish))
{
if (System.DateTime.Now.Date <= dtExpiryDate.Date)
{
if (pd.VisibleInMenu == true)
{
if ((System.DateTime.Now > pd.StartPublish) && (System.DateTime.Now < pd.StopPublish))
{
if (j == 3) { j = 1; } else { j++; }
i++;
if (i <= NoAnnouncement)
{
if (j % 2 == 0)
{
AnnouncementBlock2 = "<div class=\"announceBoxlft mdlMar\"><img src=\"{0}\" alt=\"\"><div class=\"blueOpacity\"><p>{1}</p> <a href=\"{2}\">read more</a></div><span><a id=\"bluOpacityHover\" href=\"{2}\">{1}</a></span></div>";
announcesrc2 = Convert.ToString(pd.Property["ThumbImage"]);
//announcesrc2 = UrlExtensions.ContentLink(null, pd.Property.ThumbImage) ?? string.Empty;
announceshortdesc2 = Convert.ToString(pd.Property["ShortDescription"])??string.Empty;
AnnouncementBlock2 = string.Format(AnnouncementBlock2, announcesrc2, announceshortdesc2, pd.LinkURL)??string.Empty;
AnnouncementBlock += AnnouncementBlock2;
}
else
{
AnnouncementBlock1 = "<div class=\"announceBoxlft\"><img src=\"{0}\" alt=\"\"><div class=\"blueOpacity\"><p>{1}</p> <a href=\"{2}\">read more</a></div><span><a id=\"bluOpacityHover\" href=\"{2}\">{1}</a></span></div>";
announcesrc1 = Convert.ToString(pd.Property["ThumbImage"]);
announceshortdesc1 = Convert.ToString(pd.Property["ShortDescription"]) ?? string.Empty;
AnnouncementBlock1 = string.Format(AnnouncementBlock1, announcesrc1, announceshortdesc1, pd.LinkURL) ?? string.Empty;
AnnouncementBlock += AnnouncementBlock1;
}
}
}
}
aboue the code not working
Suresh... I'm not quite following what your specific issue is within your series of posts, but regarding your initial post topic...
You can use the IContentRepository interface to get the children of a given ContentReference. For example, if you want to get all children of the StartPage as PageData, you could do this:
var repository = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<IContentRepository>(); ContentReference pageLink = ContentReference.StartPage; IEnumerable<PageData> pages = repository.GetChildren<PageData>(pageLink);
The EPiServer documentation is a great reference and starting point if you are having difficulties developing with EPiServer:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/
Specifically for your issue, you can see the documentation on this page:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/IContentRepositoryDataFactory-interface/
---
As a side note, if you are continuing to have difficulties developing with EPiServer, I highly recommend looking into taking some training (see http://www.episerver.com/Training/). EPiServer has created a great course that covers developing with EPiServer... and if it's not available in your area, they have an online course as well!
how display child page data in parent page episerver cms 7.5