Use bits of the code below as required for your specific needs.
foreach(PageData page in collection)
{
//Add Dropit.Extension.Controllers
if (PageDataManager.IsExtensionPage(page))
{
ExtensionPageData extPage = ExtensionPageData.Load(page.PageLink);
IList<ContentFunctionData> functions = extPage.GetAllContentFunctions(page.PageLink);
foreach (ContentFunctionData functionData in functions)
{
//functionData is lazy loaded.
functionData.Load();
//access each property by indexer
if (IsValue("Heading", functionData))
{
heading = functionData.Property["Heading"].ToString();
}
//OR
//iterate properties
foreach (PropertyData property in functionData.Property)
{
//do something with properties
}
//Add Dropit.Extension.Controllers
if (PageDataManager.IsExtensionPage(page))
{
ExtensionPageData extPage = ExtensionPageData.Load(page.PageLink);
IList<ContentFunctionData> functions = extPage.GetAllContentFunctions(page.PageLink);
foreach (ContentFunctionData functionData in functions)
{
//functionData is lazy loaded.
functionData.Load();
//access each property by indexer
if (IsValue("Heading", functionData))
{
heading = functionData.Property["Heading"].ToString();
}
//OR
//iterate properties
foreach (PropertyData property in functionData.Property)
{
//do something with properties
}
}
}
}
No comments:
Post a Comment