Copied to clipboard

Flag this post as spam?

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


  • Helena 3 posts 73 karma points
    Feb 11, 2021 @ 10:55
    Helena
    0

    Image name as label in block

    I'm trying to set the label in a block to the name of an image. When I type in the image alias it renders "umb://media/...".

    I have only found posts about nested content regarding this but I thought I would give it a try.

    I tried adding ncNodeName as suggested here: https://our.umbraco.com/forum/using-umbraco-and-getting-started/93912-nested-content-image-name-as-template-label

    This does not work. Is there a way to get the image name in a block label? I do not want to use a custom view for this.

  • Jabari Flatley 1 post 71 karma points
    Feb 16, 2021 @ 06:36
    Jabari Flatley
    0

    Well, actually, img, label and input, by default are put side by side.

    your image It displays in a new line because you have a large margin. If you extend the page, it will be on the same line.

    Removing the margin should solve your problem McDVOICE

  • Helena 3 posts 73 karma points
    Feb 16, 2021 @ 07:43
    Helena
    0

    Hi Jabari!

    Thanks for answering, however I think there's a misunderstanding. Maybe it's easier to understand with pictures.

    In blocks you can add a label. In the example below I check if a certain property has value, if not I will take the value from the rte I have in my block.

    Block configuration

    The label is displayed here: Block labels I want to do something similar with images. I want to be able to display the name of the image as the label.

  • 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