Copied to clipboard

Flag this post as spam?

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


  • Mathias Valentin 60 posts 208 karma points
    Feb 17, 2015 @ 14:08
    Mathias Valentin
    0

    Editor styles (grid layout)

    Hi all,

    Where do I place custom grid layout editors styles/css? inline on the editor view itself?

    Can figure out what the "Stylesheet" property does on the Umbraco.Grid data type. :/

    /Mathias

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 17, 2015 @ 14:53
    Jan Skovgaard
    0

    Hi Mathias

    Have you had a look on the documentation about the grid editor where it mentions how to change/add styles here https://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors-v7/grid-layout

    /Jan

  • Mathias Valentin 60 posts 208 karma points
    Feb 17, 2015 @ 15:02
    Mathias Valentin
    1

    Actually I have looked at the documentation, but what I am looking for here is how to style the backoffice editor view and I can't find any documentation on this (when working grid layout). 
    Do I create a .css file somewhere and somehow make it accessible to Umbraco. 
    Right now I'm doing inline styles inside the App_plugins/[package]/Views/[view].html, but this doesn't quite feels right :D

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 17, 2015 @ 15:06
    Jan Skovgaard
    0

    Hi Mathias

    Aaaa, like that - Hmmm that's a good question. I'm actually not sure about any other ways than you have just described. Perhaps it's something that should be added as a feature request on the issue tracker since the approach you're using feels a bit dirty even though it works :)

    /Jan

  • Mathias Valentin 60 posts 208 karma points
    Feb 17, 2015 @ 15:23
    Mathias Valentin
    0

    Okay - I'll go dirty inline style for now and if no one has a magical solution by tommorow I'll add a feature request. :) Thanks Jan!

  • Dan Evans 629 posts 1016 karma points
    Jul 08, 2015 @ 07:52
    Dan Evans
    0

    I am trying to apply styles to the back office editor view of a grid. In the datatype definition there is the option to apply stylesheets but does this apply only to the RTE and not the entire grid?

  • Mathias Valentin 60 posts 208 karma points
    Jul 08, 2015 @ 08:06
    Mathias Valentin
    0

    It only applies to the RTE. Looks like your are trying to achieve the same thing I was (styling the back office editor view). I ended up doing the styling inline inside the App_plugins/[package]/Views/[view].html. Not an ideal solution, but it worked.

  • Dan Evans 629 posts 1016 karma points
    Jul 08, 2015 @ 08:41
    Dan Evans
    0

    What I have worked out is that if I apply a stylesheet directly to the editor view .cshtml then it gets applied. I don't want to do this as it ends up showing on front end site too. Is there a way of selectively applying this? e.g.

    @if(adminMode== true){

    }

  • Mathias Valentin 60 posts 208 karma points
    Jul 08, 2015 @ 08:52
    Mathias Valentin
    0

    That's a good question. I actually don't know if you are able to selectively apply it. I think you should post a new question in the forum regarding this.

    /mathias

  • Dan Evans 629 posts 1016 karma points
    Jul 08, 2015 @ 09:09
    Dan Evans
    0

    I'm using LeBlender so have found this which works perfectly:

    if(!Lecoati.LeBlender.Extension.Helper.IsFrontEnd()){ }

  • Tajamal 87 posts 175 karma points
    Feb 05, 2016 @ 12:08
    Tajamal
    0

    You can use UmbracoContext.IsFrontEndUmbracoRequest and add your style, but not sure if this will work.

    I want to try this, but not sure where to include my custom stylesheet, can anyone help?

  • Jordan Lane 28 posts 130 karma points c-trib
    Apr 06, 2016 @ 11:15
    Jordan Lane
    0

    I've come up with a solution that seems to work for us, we include the stylesheet in the package manifest for LeBlender, however this meant that all our styles would be applied to the entire Umbraco back end, to solve this we created a new sass file and wrapped our imports in a selector for the editors we wanted (in our case .list-editor) which also means there is no bloat on the front end stylesheet.

    File: umbraco.scss
    .list-editor {
        /* BASE PARTIALS
        ------------------------------------------ */
        @import "partials/base/_vendor";
        @import "partials/base/_reset";
        @import "partials/base/_base";
        @import "partials/base/_buttons";
        @import "partials/base/_forms";
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft