Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gerard Torres 2 posts 22 karma points
    Apr 10, 2011 @ 18:46
    Gerard Torres
    0

    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!

  • Anders Rørvik 25 posts 47 karma points
    Apr 10, 2011 @ 19:37
    Anders Rørvik
    0

    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

  • Rich Green 2246 posts 4008 karma points
    Apr 10, 2011 @ 21:42
    Rich Green
    0

    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

  • Gerard Torres 2 posts 22 karma points
    Apr 11, 2011 @ 05:11
    Gerard Torres
    0

    Thank you for your replies. All helpful.

  • Ove Andersen 435 posts 1541 karma points c-trib
    Apr 11, 2011 @ 10:14
    Ove Andersen
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft