You can use the NodeFactory or Document APIs to get properties from nodes. If you're only looking for published data, use the NodeFactory as it queries the XML cache so it's much faster. Or if you need unpublished nodes/data you'll need to use the Document API. (see Difference between Node and Document for more info)
This wiki has an example of how to use NodeFactory to grab a node by ID and get properties: Working with NodeFactory
Check it out and let us know if you run into any problems :)
Access document type properties from code-behind
Hi,
I am adding some new features to an Umbraco extension I made several month ago.
In this extension I create an email using String.Format and an HTML string I get from the DB.
Some of the parameters I need in the string.format method are located in pages on the site.
I'm guessing I need to get the page object by name and then access the properties of it's document type,
but I have no idea where to even begin.
Thank you!
Hi Elad,
You can use the NodeFactory or Document APIs to get properties from nodes. If you're only looking for published data, use the NodeFactory as it queries the XML cache so it's much faster. Or if you need unpublished nodes/data you'll need to use the Document API. (see Difference between Node and Document for more info)
This wiki has an example of how to use NodeFactory to grab a node by ID and get properties: Working with NodeFactory
Check it out and let us know if you run into any problems :)
-Tom
is working on a reply...