Icon Field output empty

Support MB Blocks Icon Field output empty

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44721
    gerdagerda
    Participant

    Hi!

    I've create a block including the icon field. I'm using SVG codes (json file).
    The dropdown works well and shows the icons and the icon titles.

    The following code works well to get the icon title:

    $icontitle = mb_get_block_field( 'icon' );
    echo $icontitle;

    I tried using the following code to display the icon but it doesn't output anything at all.

    $icon = mb_the_block_field( 'icon' );
    echo $icon;

    How can I display the icon?

    #44730
    PeterPeter
    Moderator

    Hello,

    Thanks for your feedback.

    I can see the issue on my demo site, the code to output the icon name/title works properly but not the SVG itself. I've escalated this issue to the development team to fix it. I will get back to you later.

    #44740
    gerdagerda
    Participant

    Thank you, Peter!

    #47726
    Catharina von HobeCatharina von Hobe
    Participant

    Hello,

    I have the same issue with using SVG in json file. I did it like the documantary.

    I use for the output these:

    <?= $value[ 'icon' ] ?? ''; ?>

    Is the issue already fix or is there another way to output SVG?

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.