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?
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
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
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
Hi Edward,
Checkout the umbraco.library.GetXmlNodeByXPath Method.
Cheers,
Richard
Thats great, thanks Guys!
@Dirk - great blog post!
is working on a reply...