Copied to clipboard

Flag this post as spam?

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


  • Jürgen Starkl 2 posts 82 karma points
    Apr 04, 2016 @ 08:20
    Jürgen Starkl
    0

    Images calculated in ForEach-Loop won't display

    Hello

    Ich have a problem with images that won't display

    I want to create a table, which lists it's childs, where each child can have an image-property set

    @if (@CurrentPage.Children.Count() > 0)
    {
        <table class="table table-hover table-striped table-condensed">
            <tbody>
            @foreach (dynamic child in CurrentPage.Children)
            {
                <tr>
                    <td style="width: 170px;">
                        <img scr="@Umbraco.Media(@child.image).Url" alt="blog image"/>
                    </td>
                    <td>
                        <a href="@child.Url">@child.Name</a>
                    </td>
                </tr>
            }
            </tbody>
        </table>
    }
    
    ....
    
    Bild: <img src="~/media/1050/arzt.png" />
    

    The path to the images is calculated correctly, but they won't show in the table, as you can see in the screenshot:

    enter image description here

    I can't find the problem, help is appreciated

    Kind regards Jürgen

  • Gordon Saxby 1461 posts 1883 karma points
    Apr 04, 2016 @ 08:39
    Gordon Saxby
    101

    You have "scr" rather than "src" in your img tag?

  • Jürgen Starkl 2 posts 82 karma points
    Apr 04, 2016 @ 08:50
    Jürgen Starkl
    0

    Omg, i feel ashamed - Thanks

Please Sign in or register to post replies

Write your reply to:

Draft