Copied to clipboard

Flag this post as spam?

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


  • Sachin Sipl 4 posts 73 karma points notactivated
    May 21, 2024 @ 14:31
    Sachin Sipl
    0

    Umbraco Custom block Grid Query

    I have gone through the Umbraco documentation for creating custom blocks and it says :

    1) Within the Umbraco admin panel, if we need to attach a custom view we need to create a html file within the "App_Plugins" folder and attach it to the custom block.

    https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/build-custom-view-for-blocks

    2) If we need to render the block data on the live site we need to create a partial view under the path "Views/Partials/blockgrid/Components/".

    https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor#rendering-block-grid-content

    In this way we are maintaining 2 different files for rendering the UI of the single block and will probably maintain 2 different styling files.

    Is there a way we can just have a single UI/design/html file and that we can use both on the Umbraco admin side and live site?

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    May 21, 2024 @ 16:11
    Huw Reddick
    0

    There is an umbraco package which may work for doing your previews in the back office (depending on complexity obviously), but other than yet yes you will need to maintain both backoffic and UI views.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies