Im considering creating my own custom tree for some data I wanna store, but since the data will also be drawn for presentation on the homepage I wanna make sure that the data gets in the XML cache in App_Data, umbraco.config.
My question is, if I make my own section with a content tree for my own data will they then still be placed in the XML cache, or should I rather make it as a sub tree in the content tree?
It would largely depend on whether you derived your content type from umbraco.cms.businesslogic.CMSNode or not... If you do, then you could use the built-in methods to automatically generate the XML cache data when the data is saved...
I recommend taking a look at the Content and Media classes that are derived from CMSNode... (actually, Media is derived directly from Content, so you could do that too).
I haven't yet tried this, and there may be the need to register your new content type in the database somewhere...
The only way to get it into the XML cache is to use the Document API and have them treated as actual nodes in the content tree.
The Umbraco publishing engine works against Document so unless you're using that you're pretty much out of luck (this doesn't include classes inheriting from Document though).
Why do you want to put it into the Umbraco XML cache rather than having your own cache?
The content im storing is right now stored as Documents under its own top level folder in the content tree.
My idear was just to move that folder to a tree of my own, so the user will not confuse it with the actual site content, but still keep it as document, and as a sub folder in the content tree, cause then I presume it will be cached with the rest of the site content.
Custom Tree and XML cache
Hello
Im considering creating my own custom tree for some data I wanna store, but since the data will also be drawn for presentation on the homepage I wanna make sure that the data gets in the XML cache in App_Data, umbraco.config.
My question is, if I make my own section with a content tree for my own data will they then still be placed in the XML cache, or should I rather make it as a sub tree in the content tree?
It would largely depend on whether you derived your content type from umbraco.cms.businesslogic.CMSNode or not... If you do, then you could use the built-in methods to automatically generate the XML cache data when the data is saved...
I recommend taking a look at the Content and Media classes that are derived from CMSNode... (actually, Media is derived directly from Content, so you could do that too).
I haven't yet tried this, and there may be the need to register your new content type in the database somewhere...
Anyone have some input about this, I looked at the BaseMediaTree class in umbraco, but it just derives from BaseTree same as my custom tree.
How do I get the nodes I create in my custom tree to be a part of the xml cache?
Hint: Look at the CMSNode class... :)
The only way to get it into the XML cache is to use the Document API and have them treated as actual nodes in the content tree.
The Umbraco publishing engine works against Document so unless you're using that you're pretty much out of luck (this doesn't include classes inheriting from Document though).
Why do you want to put it into the Umbraco XML cache rather than having your own cache?
The content im storing is right now stored as Documents under its own top level folder in the content tree.
My idear was just to move that folder to a tree of my own, so the user will not confuse it with the actual site content, but still keep it as document, and as a sub folder in the content tree, cause then I presume it will be cached with the rest of the site content.
I'm not sure it's possible to create a custom content tree to show a sub-set of the content in a custom app.
Your best chance is to look at the source of the tree picker in uComponents (http://ucomponents.codeplex.com ).
is working on a reply...