My goal: Make an image rotator custom control to be used as a page header for each page in a site; where the images are different on each page. I'll need to pull these image locations from the database.
umbraco.presentation.nodeFactory.Node is marked as deprecated.
What should I use instead? Also, if there's a better way to get the information I need I'd appreciate any light on the subject. I'm a Umbraco noob.
You can use umbraco.NodeFactory instead , although I guess a lot of people are still using the old nodefactory api. It still works just fine, However, Visual studio will annoy you :) Anyway, with respect to Umbraco itself, I recommend watching the videos on umbraco.org
I second Rich Green. There are a lot of examples on getting media with Razor and XSLT on these forums, so you should probably be able to find something that you can use.
umbraco.presentation.nodeFactory.Node deprecated
While researching, I've come across the following post for accessing Media in a code-behind:
http://blog.meidianto.com/2010/08/24/umbraco-how-to-get-media-in-code-behind/
My goal: Make an image rotator custom control to be used as a page header for each page in a site; where the images are different on each page. I'll need to pull these image locations from the database.
umbraco.presentation.nodeFactory.Node is marked as deprecated.
What should I use instead?
Also, if there's a better way to get the information I need I'd appreciate any light on the subject. I'm a Umbraco noob.
Thanks!
Hey and welcome!
You can use umbraco.NodeFactory instead , although I guess a lot of people are still using the old nodefactory api. It still works just fine, However, Visual studio will annoy you :) Anyway, with respect to Umbraco itself, I recommend watching the videos on umbraco.org
You don't need to use the API for this, just use either inline Razor or an xslt macro (video here http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/sitebuilder-introduction/creating-your-first-xslt-macro)
Rich
Thank you for your replies. All helpful.
I second Rich Green. There are a lot of examples on getting media with Razor and XSLT on these forums, so you should probably be able to find something that you can use.
is working on a reply...