Copied to clipboard

Flag this post as spam?

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


  • manwood 87 posts 109 karma points
    Feb 14, 2010 @ 22:13
    manwood
    0

    How can I use data created by the CMS in my own widget?

    I have the CWS and am using the events control to insert events. That's all fine. However I want to get the data for those events and display them in my own calendar control - how do I go about doing this?

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Feb 14, 2010 @ 22:19
    Lee Kelleher
    0

    Hi manwood,

    One approach would be to use /Base - to expose any Umbraco data/nodes via REST?

    http://our.umbraco.org/wiki/reference/umbraco-base

    Alternatively, if your own calendar control is part of the same web-application (ASP.NET), then you could reference the various Umbraco DLLs and use the API directly?

    As a last resort, you could pull in the XML cache (on the filesystem, "/data/umbraco.config") and work with the XML structure directly.

    There are many ways to achieve what you want with Umbraco.

    Cheers, Lee.

  • manwood 87 posts 109 karma points
    Feb 14, 2010 @ 22:32
    manwood
    0

    Alternatively, if your own calendar control is part of the same web-application (ASP.NET), then you could reference the various Umbraco DLLs and use the API directly?

     

    Ok, that sounds like a goer. Which DLLs? Any tutorials? I am completely new to umbraco.

    Thanks

    Ps. am i right in thinking all user generated content ends up in the umbraco.config file rather than the database? This is surely a performance issue for large sites, no?

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Feb 14, 2010 @ 22:48
    Lee Kelleher
    0

    Hi manwood,

    The wiki has some good info about how to use the API.  Quick refs for DLLs are: umbraco.dll, businesslogic.dll and cms.dll (you might need a few of the others later - such as controls.dll and interfaces.dll)

    http://our.umbraco.org/wiki/reference/api-cheatsheet

    As for the "umbraco.config" file.  Only nodes from the Content section are stored there. This is only an XML cache (on the filesystem), is it mostly used for the XSLT transformations and the nodeFactory class.  Everything is still kept in the database - but the XML cache helps to speed things up on the front-end.

    Performance-wise... I don't have any benchmarks, but the XML cache is loaded in-memory (so it's super-fast), and can handle around 200,000 nodes before you'd notice any issues. (All depending on your server's specs, of course!)  If you do find any problems, feel free to let us all know - or raise a ticket on CodePlex?

    Cheers, Lee.

     

  • manwood 87 posts 109 karma points
    Feb 15, 2010 @ 00:30
    manwood
    0

    Hi Lee

     

    Thanks for the advice. I cant find any API documentation for the DLLs you mention - is there a full API documentation available somewhere? Random cheat sheet suggestions are useful if they cover what you are looking for.. but you have to know what you're looking for!

     

    Thanks

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Feb 15, 2010 @ 00:54
    Lee Kelleher
    0

    Hi manwood,

    The DLLs can be found in the /bin/ directory of your Umbraco install.  For starters take the 3 main DLLs: "umbraco.dll", "businesslogic.dll" and "cms.dll".

    I'd suggest starting by pulling in some node data, reading a few properties, etc.

    http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-the-nodefactory

    The way I learnt the Umbraco API was to crack open the DLLs in Reflector and start experimenting.  You could download the source-code (from CodePlex) and explore from there... but Reflector suited me better.

    If you run into any specific problems, feel free to post them here - we're happy to help!

    Cheers, Lee.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies