Copied to clipboard

Flag this post as spam?

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


  • Edward Dudley 80 posts 121 karma points
    Jan 11, 2010 @ 17:53
    Edward Dudley
    0

    General Extending Umbraco Question

    Hi,

    I'm fairly new to .NET but I've been using Umbraco for quite a while.  I'm starting to look into creating custom controls and HttpHandlers and I'd like to be able to access the Umbraco XML structure from these.

    I've been looking through the Umbraco dll to try to find some method, maybe that would return an XmlNodeIterator for the whole site, or part of it if supplied with an XPath query but I can't find anything.

    Google hasn't found anything either but maybe I'm looking for the wrong thing.

    Can anyone point me in the right direction or recommend a tutorial somewhere on extending Umbraco?

    Thanks

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 11, 2010 @ 19:54
    Dirk De Grave
    2

    Hi Edward,

    1/ umbraco xml: don't start reading/fiddling the xml file yourself, use the nodeFactory for fast and readonly access to published content. If however, you need access to non published documents, use the document api. (See per example on my blog)

    2/ Custom controls: for use on frontend? It's pure asp.net, so no magic required here. If you wish to use it in templates, create a macro and register your custom control and you're ready to use your control. Same goes for user controls. Feel free to ask for more info if required.

    3/ HttpHandlers: Same remark as 2/ Just build your http handler, register in web.config and you're set. It's again just plain asp.net

     

    Cheers,

    /Dirk

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jan 11, 2010 @ 20:03
    Richard Soeteman
    1

    Hi Edward,

    Checkout the umbraco.library.GetXmlNodeByXPath Method.

    Cheers,

    Richard

  • Edward Dudley 80 posts 121 karma points
    Jan 15, 2010 @ 19:16
    Edward Dudley
    0

    Thats great, thanks Guys!

    @Dirk - great blog post!

Please Sign in or register to post replies

Write your reply to:

Draft