Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1474 posts 3451 karma points c-trib
    Aug 10, 2011 @ 13:47
    Simon Dingley
    0

    Register Custom CSS File in BaseTree_BeforeTreeRender Method

    I'm trying to add a custom CSS file to the content tree but using the following code I am getting a null value when trying to access the ClientDependencyLoader.

    ClientDependencyLoader.Instance.RegisterDependency("~/umbraco/plugins/myplugin/screen.css", ClientDependencyType.Css);

    How should I go about registering my file? Without using CDF?

    Cheers, Simon

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Aug 10, 2011 @ 14:14
    Lee Kelleher
    1

    Hi Simon,

    I haven't tried to add a custom CSS for the content tree, but might be worth taking a look at an upcoming package I've been working on called BackOffice Power Scripts.  It lets you insert custom CSS/JS directly into the back-office, via a config file.

    It doesn't use ClientDepenedency - but inserts the references via a HttpModule Response Filter.

    https://bitbucket.org/vertino/backoffice-power-scripts-for-umbraco/downloads

    The current RC1 download adds them to the "umbraco.aspx" only ... but there's a branch called "injector" which is still a work-in-progress, that can target specific pages. Feel free to grab the source and rip out any parts that you need, etc.

    Cheers, Lee.

  • Simon Dingley 1474 posts 3451 karma points c-trib
    Aug 10, 2011 @ 14:34
    Simon Dingley
    0

    This seems insanely difficult for something that should be quite simple. Due to time restrictions I am going to have to edit the umbraco.aspx file by hand but hopefully I will get time at some point to resolve this, maybe something in your source will lead me to a solution.

    Cheers, Si

  • 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