Copied to clipboard

Flag this post as spam?

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


  • marcus henriksen 6 posts 136 karma points
    Aug 18, 2015 @ 07:33
    marcus henriksen
    0

    Using fanoe Logo Code for my own site.

    Hello, im new to umbraco and i'm having some trouble with my logo, i would like the admin to be able to change the logo easily like on the Fanoe starter template/design, so i went to the masterpage on the fanoe site and copiede the logo code -

    <div class="col-xs-8 col-sm-12 col-md-4">
    <a href="@home.Url">
    <div class="brand"  style="background-image:url('@(home.SiteLogo)?height=65&width=205&bgcolor=000')"></div>
    </a>
    

    im using bootstrap myself on my own site btw. so after pasting the above code into my own master page at the desisered logo location i went to my "Forside" Document type and created a Fileupload with the name - Site Logo and alias siteLogo under the tab "logo og ting"

    after that i went to my content page - Forside (home in english) and uploaded a image using the Site Logo Upload.

    then i went back into my Masterpage template to edit:

    "home.SiteLogo" to "forside.SiteLogo" and a href @home.Url to @Forside.Url

    after doing so - when i run the code it gives me the error
    "Compiler Error Message: CS0103: Navnet 'Forside' findes ikke i den aktuelle sammenhæng"

    i also tried changeing back to "home" both places but then it just gives me the same error message but with the name "home" not existing.

    Anyone got some advice as to why this is happening?

  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Aug 18, 2015 @ 08:29
    Nik
    1

    So my first observation is that you've typed @Forside.Url where as it was @home.Url, note the casing of @Forside.

    I would try using @forside to startwith.

    That aside, where are you declaring and initialising your forside variable?

  • marcus henriksen 6 posts 136 karma points
    Aug 18, 2015 @ 09:27
    marcus henriksen
    0

    Thank you Nik, i did try with both capital and normal letters.

    "Where are you declaring and initialising your firsode variable?" no where i think? that might be it, im missing something? All i have done so far, is as writte in my above post, so i dont think im declaring it anywhere.

    How and where would you do it please?

  • marcus henriksen 6 posts 136 karma points
    Aug 18, 2015 @ 11:06
    marcus henriksen
    100

    So i forgot to intitialise the home/forside variable, thx alot for the hint Nik.

    all i needed to do was add

     var home = @CurrentPage.Site();
    

    in the top of my masterpage template.

  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Aug 18, 2015 @ 16:37
    Nik
    0

    No problem :-) Pleased the hint helped.

Please Sign in or register to post replies

Write your reply to:

Draft