Sitefinity Find Generic Content By Name
Posted on: Mon Aug 16 13:49:18 -0700 2010. Updated on: Mon Aug 16 13:50:29 -0700 2010.
Category: Telerik Controls and Sitefinity
Category: Telerik Controls and Sitefinity
Find a generic content item in sitefinity by it's name and access the text...
using Telerik.Cms.Engine;
...
ContentManager contentMngr = new ContentManager();
IContent wordOfDay = contentMngr.GetContent(WordOfDayContentItem);
if (wordOfDay != null)
{
LabelWordOfTheDay.Text = wordOfDay.Content as string;
}