Using a DynamicNodeList you can add items using the following syntax
var nodes = new DynamicNodeList(); var n = new DynamicNode(itemId); nodes.Add(n);
But when I try the following
var nodes = new DynamicMediaList(); var n = new DynamicMedia(mediaId); nodes.Add(n)
The below message appears
umbraco.MacroEngines.DynamicMediaList' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'umbraco.MacroEngines.DynamicMediaList'
How do you add DynamicMedia to a DynamicMediaList?
Currently, DynamicMediaList does not have an add method. If you get a copy of umbraco.MacroEngines.dll from one of the nightlies, you will be able to use this code:
var nodes = new DynamicMediaList(); var n = Model.MediaById(mediaId); nodes.Add(n);
Otherwise, just stick them in a generic List<DynamicMedia>.
Add method for DynamicMediaList?
Using a DynamicNodeList you can add items using the following syntax
But when I try the following
The below message appears
umbraco.MacroEngines.DynamicMediaList' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'umbraco.MacroEngines.DynamicMediaList'
How do you add DynamicMedia to a DynamicMediaList?
Currently, DynamicMediaList does not have an add method. If you get a copy of umbraco.MacroEngines.dll from one of the nightlies, you will be able to use this code:
Otherwise, just stick them in a generic List<DynamicMedia>.
is working on a reply...