Copied to clipboard

Flag this post as spam?

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


  • John 88 posts 112 karma points
    Dec 03, 2011 @ 13:04
    John
    0

    umbraco.config Events

    Hi. In his video Rob makes reference to some kind of event when items are added to the umbraco.config and being able to intercept these events, specifically for the purpose of NOT adding large text blobs to the umbraco.config file.

    I'd love to be able to do this same thing, is this available yet through the API?

    Cheers

  • Stephan Lonntorp 195 posts 212 karma points
    Dec 03, 2011 @ 13:42
    Stephan Lonntorp
    0

    I don't know what video you are referring to, but I'm guessing it has to do with Umbraco <5, and what he then must be referring to is the OnBeforePublish event of the Document object, available by implementing a class inheriting from ApplicationBase, and then hooking into the event Document.BeforePublish.

     

    Hope it helps.

    //S

  • John 88 posts 112 karma points
    Dec 03, 2011 @ 13:50
    John
    0

    Sorry, I had every intention of posting the video but forgot:

    codegarden11.com/sessions/day-2/slot-one/multi-environment-team-based-development-with-umbraco-at-microsoft.aspx

    I still want the field to exist with it's data in the DB, I just don't want it added to the umbraco.config file (for space reasons). The Before publish event just lets me cancel the publish doesn't it?

  • Stephan Lonntorp 195 posts 212 karma points
    Dec 03, 2011 @ 13:55
    Stephan Lonntorp
    0

    Oh, I get it, then you'd probably want to hook into another event, probably umbraco.content.OnBeforeUpdateDocumentCache.

     

    You can see all events here: http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events

  • John 88 posts 112 karma points
    Dec 03, 2011 @ 13:59
    John
    0

    Ah, thank you, I'll investigate that.

Please Sign in or register to post replies

Write your reply to:

Draft