Copied to clipboard

Flag this post as spam?

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


  • Jacob 39 posts 88 karma points
    Nov 23, 2010 @ 21:09
    Jacob
    0

    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?

  • Robert Foster 459 posts 1820 karma points MVP 2x admin c-trib
    Nov 24, 2010 @ 14:43
    Robert Foster
    0

    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...

     

  • Jacob 39 posts 88 karma points
    Dec 01, 2010 @ 14:50
    Jacob
    0

    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? 

  • Robert Foster 459 posts 1820 karma points MVP 2x admin c-trib
    Dec 02, 2010 @ 03:01
    Robert Foster
    0

    Hint: Look at the CMSNode class... :)

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 02, 2010 @ 06:35
    Aaron Powell
    0

    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?

  • Jacob 39 posts 88 karma points
    Dec 02, 2010 @ 09:14
    Jacob
    0

    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. 

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 02, 2010 @ 22:06
    Aaron Powell
    0

    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 ).

Please Sign in or register to post replies

Write your reply to:

Draft