Copied to clipboard

Flag this post as spam?

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


  • Holger Bloedorn 4 posts 74 karma points
    May 05, 2016 @ 01:43
    Holger Bloedorn
    0

    Cannot get MediaById without an id

    Hi

    i am a newbie facing a small problem.

    I updated our company website online with some actual projects / photos. So i created new folders, added all required information and pictures for slideshows in the requested size and suddenly i get this :

    Error loading Razor Script ProductSlider.cshtml Cannot get MediaById without an id

    I have no idea what to to. Can someone pleeeease help me.

    Thank you for your support

    Cheers

    Holger

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    May 05, 2016 @ 08:05
    Jeavon Leopold
    1

    Hi Holger,

    Welcome to Our!

    Could you please post the code from ProductSlider.cshtml?

    Jeavon

  • Manish 373 posts 932 karma points
    May 05, 2016 @ 08:34
    Manish
    1

    Where you have created new folder inside media folder or in code ?

  • Manish 373 posts 932 karma points
    May 05, 2016 @ 08:37
    Manish
    1

    You can use code like this

    @if (CurrentPage.HasValue("imagealias") != null && CurrentPage.HasValue("imagealias") != false)

    { var Image = Umbraco.Media(Umbraco.Field("imagealias").ToString()).Url.ToString();

              <img src="@Image " class="full-width">
    

    }

  • Holger Bloedorn 4 posts 74 karma points
    May 05, 2016 @ 21:47
    Holger Bloedorn
    0

    Hi Guys, first thank you all for the support. I just killed the whole part of the website and started again - now it works. maybe not the gentleman/pro way to do it... but the result is OK. Greetings from New Zealand Thanks again You are great

    Holger

  • 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