Copied to clipboard

Flag this post as spam?

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


  • Jeroen Oostwouder 100 posts 296 karma points
    Jan 25, 2023 @ 08:36
    Jeroen Oostwouder
    0

    Getting Block-settings within a custom view

    I'm working on an Umbraco 10.4 installation, and I'm trying to get the hang of the new BlockGrid.

    So far, I'm loving it!

    However, I just can't seem to read fields from the settings-node, within my custom view in the backend.

    This page mentions a way to get a settings-value in the label field. https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor#block-configuration-settings

    And I can get to my settings in the front-end-view by using Model.Settings.Value(). But how do you get a settings-value within the custom view?

    I've tried

    • {{settings.fieldname}}
    • {{block.fieldname}}
    • {{block.settings.fieldname}}
    • {{block.data.fieldname}}
    • {{block.data.settings.fieldname}}

    It's probably a very simple answer, but I just can't find any info about it. And AngularJS isn't my strongest point ;)

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jan 25, 2023 @ 08:52
    Huw Reddick
    101

    Hi Jeroen,

    I think it is block.settingsData.fieldname

  • Jeroen Oostwouder 100 posts 296 karma points
    Jan 26, 2023 @ 13:54
    Jeroen Oostwouder
    0

    Thanks, that was the solution.

    It doesn't help that block-label, frontend and backend all have other names :) But it works now.

Please Sign in or register to post replies

Write your reply to:

Draft