Copied to clipboard

Flag this post as spam?

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


  • Shiraj 47 posts 125 karma points
    Jul 15, 2013 @ 08:15
    Shiraj
    0

    Images not displaying

    Hi,

    I am new to Umbraco and fogive me if this is a wrong forum to ask this question

    I need a feature where my client can upload logo for website using umbraco?

    Should I use fileupload or media picker? I tried both and inserted filed to masterpage but nothing is displaying?

    then I installed Digibiz and I cannot find out how to display uplaoded image on the page?

    Can anyone advice or suggest me a way.

    Thanks

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 15, 2013 @ 10:56
    Jeavon Leopold
    100

    Hi There,

    This is the right place to ask for any Umbraco help!

    Using core functionality you should probably use a media picker to allow your umbraco admin user to pick which item they want to display. Depending on if you are using masterpages (.master) or mvc (.cshtml) templates you will need to use a macro (masterpages) or in template razor (mvc) to render your image on your front end website. 

    There is a page of documentation for the media picker here which includes the code samples you should be able to use.

    DAMP is a fantastically flexible and advanced media picker and there are loads of examples of how to use it, starting with this video

    I hope that helps you?

    Thanks,

    Jeavon

  • Shiraj 47 posts 125 karma points
    Jul 23, 2013 @ 18:40
    Shiraj
    0

    Hi,

    I have created a content type and used this code to dispaly the image

    <umbraco:Macro runat="server" language="cshtml">
        <img src="@Library.MediaById(Model.Logo).umbracoFile" alt"@Library.MediaById(Model.Logo).nodeName">
                </umbraco:Macro>

    When I check

    http://localhost:60412 - I cannot see the logo image

    but when I request

    http://localhost:60412/website-logo.aspx - I can see the logo

    How can I display this in my home page?

    Thanks

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 23, 2013 @ 18:45
    Jeavon Leopold
    0

    Hi Shiraj,

    I guess that you have a few pages in your content tree then and you have added the media picker to the page "Website-logo" rather than the homepage?

    Could you please post a screenshot of your content tree?

    Thanks,

    Jeavon

  • Shiraj 47 posts 125 karma points
    Jul 23, 2013 @ 18:58
    Shiraj
    0

  • Shiraj 47 posts 125 karma points
    Jul 23, 2013 @ 19:01
    Shiraj
    0

    Hi Jeavon,

    I am not possible to uplaod an image.I dont know the reason

    Here it is

    http://i40.tinypic.com/rigmbp.jpg

  • Shiraj 47 posts 125 karma points
    Jul 23, 2013 @ 19:15
    Shiraj
    0

    I tried this code

     
    {$media/@nodeName}

    Now it showing like this.Not image path is rendering

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 23, 2013 @ 19:28
    Jeavon Leopold
    0

    Ok, so first thing to know if that is a good idea to create a homepage and then to have all other pages as children of that homepage.

     

     

     

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 23, 2013 @ 19:34
    Jeavon Leopold
    0

    The image wasn't appearing on your homepage when you had it working because the page "website logo" was not the first node in the tree.

  • Shiraj 47 posts 125 karma points
    Jul 25, 2013 @ 11:23
    Shiraj
    1

    Hi,

    Jeavon thanks I created the page strcture correctly and now image is showing

Please Sign in or register to post replies

Write your reply to:

Draft