Copied to clipboard

Flag this post as spam?

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


  • Aximili 177 posts 278 karma points
    May 25, 2011 @ 05:42
    Aximili
    0

    cshtml for image gallery?

    I am new to Umbraco. I am creating an image gallery (called Customers) under Content. A Customer has a logo, which is an image.

    How do I create a razor macro that outputs a list of customer logos?

    Please see my screenshot here: http://stackoverflow.com/questions/6119050/umbraco-razor-and-image-gallery

  • Aximili 177 posts 278 karma points
    May 25, 2011 @ 08:05
    Aximili
    0

    This forum is buggy. I can't delete this post. I solved this problem (see the link)

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    May 25, 2011 @ 08:21
    Sebastiaan Janssen
    0

    @customer.logo will return a perfectly valid relative path (/media/1234/logo.jpg), no need to use IOHelper.

    <img src="@customer.logo" alt="@customer.Name"/>
  • Aximili 177 posts 278 karma points
    May 25, 2011 @ 08:57
    Aximili
    0

    No it returns ~/media/105/ozmosis.jpg (with tilde).

    I actually need the tilde, since I am running this from Visual Studio, because I don't think IIS 5 can run Umbraco

Please Sign in or register to post replies

Write your reply to:

Draft