Copied to clipboard

Flag this post as spam?

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


  • Rhys Mitchell 28 posts 195 karma points
    Mar 23, 2017 @ 12:50
    Rhys Mitchell
    0

    LeBlender injects Bootstrap Styles into Backoffice

    Hi Umbraco Land!

    I was mocking up a LeBlender build today for my company to see if I could circumvent dealing with too much AngularJSfor developing Custom Grid Editors.

    I get a curious thing that keeps happening where anything I apply to a Custom Grid Editor will override the Backoffice style to Bootstrap.

    I will provide code and screenshots for anyone willing to poke at this.. The same happens with a simple Textstring property also.

    Code: (ProfilePicture.cshtml)

            @inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
        @{
            Layout = "";
            var image = Model.Items.ElementAt(0);
            var imageUrl = Umbraco.TypedMedia(image.GetValue<string>("image")).Url;
        }
    
    <img src="@imageUrl" />
    

    Before uploading an Image:enter image description here

    After uploading an Image:

    enter image description here

  • Rhys Mitchell 28 posts 195 karma points
    May 02, 2017 @ 07:40
    Rhys Mitchell
    100

    Hi there,

    I figured this out in the end. All it was is, _ViewStart.cshtml is indexing _Layout.cshtml as its Master Template as standard. I imagine this has something to do with the way Umbraco Visual Studio solutions are built.

    Simply setting Layout = null; in _Layout.cshtml fixes this issue.

    All the best, Rhys.

Please Sign in or register to post replies

Write your reply to:

Draft