Getting a list of nodes of a certain node type alias is easy as there is a nodeTypeAlias property on the Node object, however, the Content Type Picker type for a user control property spits out a list of content type IDs. I've noticed in the App_Data/umbraco.config file that there is infact an attribute on each node called nodeType which stores the ID but there doesn't seem to be any access to it via the API.
What I've also done is create my own Macro PropertyType - essentially the same as the contentTypeSingle and contentTypeMultiple except that the value is the Content Type alias, instead of the Content Type ID.
Node types by ID
Hi,
Getting a list of nodes of a certain node type alias is easy as there is a nodeTypeAlias property on the Node object, however, the Content Type Picker type for a user control property spits out a list of content type IDs. I've noticed in the App_Data/umbraco.config file that there is infact an attribute on each node called nodeType which stores the ID but there doesn't seem to be any access to it via the API.
Umbraco 4.7
Cheers
Any ideas on this?
uComponents (changeset 81208, will be released with v2.2) has a method for this:
Interesting, thanks Ove.
What I've also done is create my own Macro PropertyType - essentially the same as the contentTypeSingle and contentTypeMultiple except that the value is the Content Type alias, instead of the Content Type ID.
is working on a reply...