which will give us possibility to use DynamicNode class and other powerful toys.
Than we can do next
dynamic property = node.HasProperty("property") && node.HasValue("property") ? node.GetPropertyValue("property") : null; if (property != null) { //primaly content is Xml and can be loaded into umbraco.MacroEngines.DynamicXml object dynamic propertyDynamicXml = new DynamicXml(property); //item in foreach loop is also from class umbraco.MacroEngines.DynamicXml foreach (var item in propertyDynamicXml) { string name = item.BaseElement.Element("name") != null ? item.BaseElement.Element("name").Value : string.Empty; } }
Loop Embeded Content
How do i loop Embedded Content From TheFARM in a usercontrol (C#)
Great oportunity gives include
which will give us possibility to use DynamicNode class and other powerful toys.
Than we can do next
dynamic property = node.HasProperty("property") && node.HasValue("property")? node.GetPropertyValue("property")
: null;
if (property != null)
{
//primaly content is Xml and can be loaded into umbraco.MacroEngines.DynamicXml object
dynamic propertyDynamicXml = new DynamicXml(property);
//item in foreach loop is also from class umbraco.MacroEngines.DynamicXml
foreach (var item in propertyDynamicXml)
{
string name = item.BaseElement.Element("name") != null
? item.BaseElement.Element("name").Value
: string.Empty;
}
}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.