Copied to clipboard

Flag this post as spam?

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


  • seanrock 241 posts 462 karma points
    Sep 13, 2020 @ 12:31
    seanrock
    0

    Specifying a custom view for Block configuration returns 404

    Hello

    Just having a go with the new Block List type. When specifying a custom view a 404 error is returned.

    The documentation is very sparse about this configuration, so all I've done is copied the labelblock.editor.html view to my own folder /views/partials/blocklist/customviews/myblock.editor.html.

    I suspect there is something more that is required but I'm not seeing anything in the documentation.

    Thanks.

  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Sep 13, 2020 @ 15:21
    Bjarne Fyrstenborg
    0

    Hi

    You can find information here regarding adding a custom view here: https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Block-List-Editor/#write-your-own-html-view

    You then need to select this html file from the configuration of the block editor.

    I haven't noticed this returns 404. I would recommend add a folder in App_Plugins where you place any custom view, but it should work in other locations as well like at root level.

    Furthermore you might need the add the the class blockelement__draggable-element if you want the custom views to be soetable: https://github.com/umbraco/Umbraco-CMS/issues/8873

    /Bjarne

  • seanrock 241 posts 462 karma points
    Sep 13, 2020 @ 15:37
    seanrock
    0

    Thanks

    I already know about that link as it is in the documentation which provides the example, but the html in the view isn't the issue, it cannot find the view. When selecting the view in the configuration it opens a tree showing the root of site which suggests the view can be placed anywhere.

    I'll give it a go with adding it to App_Plugins.

  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Sep 13, 2020 @ 15:55
    Bjarne Fyrstenborg
    0

    I haven't noticed it isn't possible to select a custom view for the block.

    Do you see any error in the block list configuration or in the content section in the block list editor?

    enter image description here

  • seanrock 241 posts 462 karma points
    Sep 14, 2020 @ 05:44
    seanrock
    0

    Hi

    You're not understanding what I'm saying.

    I can select view as i've said, however the view that is selected creates 404 when viewing the edit page in the umbraco backoffice.

    However as you've discovered it works in the App_Plugins folder i'll try that.

    Thanks.

  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Sep 14, 2020 @ 07:05
    Bjarne Fyrstenborg
    0

    Hi

    Could you please read my latest responses in this thread? I wrote I could reproduce the issue when placing the html view in ~/Views folder and that I have reported the issue on the Umbraco issue tracker: https://github.com/umbraco/Umbraco-CMS/issues/8890

    For now I will suggest you place any custom views for block editor in~/App_Plugins folder.

    I tried with a view placed at root level, which also seems to work though.

  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Sep 13, 2020 @ 15:58
    Bjarne Fyrstenborg
    0

    Okay, I can reproduce the issue in placing the html view inside ~/Views/ folder.

    However inside ~/App_Plugins/ it does seem to work.

  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Sep 13, 2020 @ 16:07
    Bjarne Fyrstenborg
    0

    I have reported this as an issue here: https://github.com/umbraco/Umbraco-CMS/issues/8890

    For now I would recommend the place the custom views inside App_Plugins folder.

Please Sign in or register to post replies

Write your reply to:

Draft