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 would like to list all generic properties of the current document and get the name and value of each. So far I've got this:
foreach (var property in Model.Content.Properties) { <p>@property.Value</p> }
On the property object I can also get the alias though PropertyTypeAlias, but how do I get the name atribute?
Thanks,Daniel
Possibly using....
umbraco.library.GetPropertyTypeName(String ContentTypeAlias, String PropertyTypeAlias)
Daniel
How about making use of
@property.Alias
or
var node = umbraco.NodeFactory.Node.GetCurrent(); foreach(Property property in node.Properties){ <p>@property.Alias <br/> @property.Value</p> }
Thanks Mike! That worked!
Fuji, Alias is unfortunately not good enough since I want to display it for the end user. BTW the commande to get the alias seems to be property.PropertyTypeAlias.
/Daniel
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
List name and value of all properties
I would like to list all generic properties of the current document and get the name and value of each. So far I've got this:
On the property object I can also get the alias though PropertyTypeAlias, but how do I get the name atribute?
Thanks,
Daniel
Possibly using....
Daniel
How about making use of
or
Thanks Mike! That worked!
Fuji, Alias is unfortunately not good enough since I want to display it for the end user. BTW the commande to get the alias seems to be property.PropertyTypeAlias.
/Daniel
is working on a reply...