Copied to clipboard

Flag this post as spam?

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


  • David Jazbec 22 posts 144 karma points
    Jun 30, 2023 @ 20:28
    David Jazbec
    0

    Hide Label above Layout Block in backoffice

    Hi lads,

    im exploring the Grid Block editor, and i really like it. I installed the demo umbDemoBlocks that come with it. The "Two Columns Block" that comes with it does not show any label above it in the Backoffice but my own Three Columns Block does and i cannot find out where can i disable it?

    enter image description here

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Jul 01, 2023 @ 10:44
    Marc Goodson
    1

    Hi David

    It's because in the demo, those two section layouts have a custom view...

    If you click on the Block Grid Data Type in the settings section

    Click on the Two-Column section, and then the 'Advanced' tab in top right hand corner

    You'll see a path to a custom view

    ~/App_Plugins/My.BlockGridViews/section.html

    which controls how this section looks in the backoffice. and if you have a look in the view, you'll see no attempt to render the label above.

    But if you create a new layout and don't specify a custom view, the default implementation of the block list is to put the label above (a bit like the old grid implementation in earlier versions of Umbraco)

    regards

    Marc

  • David Jazbec 22 posts 144 karma points
    Jul 01, 2023 @ 19:41
    David Jazbec
    0

    Hi Marc,

    thank you for your response.

    it does make sense that the blocks are using different custom views. but the demo block uses this view:

    ~/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoTwoColumnLayoutBlock.html
    

    and i dont even this folder/file in the "App_Plugins" Folder, which lets me think that the file is actually being pulled from somewhere else. Could this be the case or am i just blind?

    enter image description here

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Jul 01, 2023 @ 21:08
    Marc Goodson
    100

    Hi David

    My bad! I think i'm looking at an early grid demo site that was released for UK fest and can see there is an updated one now for cg23

    https://github.com/kjac/UmbracoBlockGridCG23/blob/main/App_Plugins/My.BlockGrid/Views/section.html

    Is this the file you are looking for?

    https://github.com/umbraco/Umbraco-CMS/blob/1d14158d82ce5d9e3ed9766e8e11faddb455be19/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoTwoColumnLayoutBlock.html#L2

    Looks like it's shipped as a static asset in a razor class library..

    Regards

    Marc

  • David Jazbec 22 posts 144 karma points
    Jul 02, 2023 @ 10:26
    David Jazbec
    0

    Hi Marc,

    this is it!

    Copied it to my Custom views & using it with my Layouts, works wonderfully.

    Thank you!

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft