Copied to clipboard

Flag this post as spam?

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


  • Murray Roke 503 posts 966 karma points c-trib
    Jul 01, 2015 @ 04:12
    Murray Roke
    0

    Delete Stylesheet properties programatically.

    Hi,
    I'd like to delete the "h1" property from the "Editor" stylesheet. I can do it via the back office, but I want to add it to a migration script. Can I do this?

    I've tried:

            var editor = ApplicationContext.Current.Services.FileService.GetStylesheetByName("Editor");
            editor.Properties = editor.Properties.Where(p => p.Alias != "h1");
    

    but editor.Properties has no setter.

    Cheers.
    Murray.

  • Murray Roke 503 posts 966 karma points c-trib
    Jul 13, 2015 @ 22:13
    Murray Roke
    0

    this will-be-has-been fixed/changed in v 7.3 http://issues.umbraco.org/issue/U4-114 so I can just change the css file.

Please Sign in or register to post replies

Write your reply to:

Draft