Copied to clipboard

Flag this post as spam?

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


  • denism8 21 posts 41 karma points
    Jan 09, 2013 @ 15:18
    denism8
    0

    How can I use the media images in my template?

    1.

    2.

    3.

     

    How can I use the media images in my template?

    I need only the urls like this:

    "media/349/example.jpg65465.jpg"

  • Amir Khan 1287 posts 2744 karma points
    Jan 10, 2013 @ 06:30
    Amir Khan
    0

    Do you want to loop through all of the media items in the folder? Here's a start: http://our.umbraco.org/wiki/reference/code-snippets/razor-snippets/simple-media-browser/media-folder-content-list

    Create a Media Picker property on your document type and select the folder. You can also do this with the multi-node tree picker if you wanted to pick just a few media items in the folder, for example.

    Hope this helps!

  • denism8 21 posts 41 karma points
    Jan 10, 2013 @ 09:25
    denism8
    0

    Thanks, but in umbraco 4.11.1 it doesn`t work :(

    @Parameter (The name 'Parameter' does not exist in the current context)
    Model.MediaById(folderId) ('Umbraco.Web.Models.RenderModel' does not contain a definition for 'MediaById' and no extension method 'MediaById' accepting a first argument of type 'Umbraco.Web.Models.RenderModel' could be found (are you missing a using directive or an assembly reference?)

    When I inherits following:

    @using umbraco.MacroEngines;
    @inherits umbraco.MacroEngines.DynamicNodeContext

    my

    @Html.Link("~/css/bootstrap.min.css")
    @Html.Link("~/css/bootstrap.min.customize.css")
    @Html.Link("~/css/Collection.css")

    doesn´t work.

    I need the @Html.Link(...) and @Url.Content(...).

    What can I do?

Please Sign in or register to post replies

Write your reply to:

Draft