Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying to get all properties for a document where the alias contains social not sure how to do this in razor so far i have
@inherits umbraco.MacroEngines.DynamicNodeContext@{ dynamic node = new umbraco.MacroEngines.DynamicNode(1050);}var props = node.PropertiesAsList.Where("")
any ideas how to do this?
Regards
Ismail
How about something like this:
@using umbraco.MacroEngines@foreach (DynamicNode item in someNodeCollection){ foreach (var prop in item.PropertiesAsList.Where(x => x.Alias.Contains("a"))) { @item.Name }}
The point being: you need to have the node defined as DynamicNode instead of dynamic.
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.
Continue discussion
Get all properties with property alias contains
I am trying to get all properties for a document where the alias contains social not sure how to do this in razor so far i have
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
dynamic node = new umbraco.MacroEngines.DynamicNode(1050);
}
var props = node.PropertiesAsList.Where("")
any ideas how to do this?
Regards
Ismail
How about something like this:
The point being: you need to have the node defined as DynamicNode instead of dynamic.
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.