Copied to clipboard

Flag this post as spam?

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


  • Ellie 17 posts 52 karma points
    Aug 12, 2014 @ 14:00
    Ellie
    0

    body background image in master page

    Hi,

    I am new in umbraco.

    I have a master page and body has a background image. How can I make the background image cantent managable?

    Thanks

    Elham

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Aug 12, 2014 @ 17:52
    Dennis Aaen
    0

    Hi Elham,

    If you could tell some more about your setup, I think that I could help you with a possible solution.

    But I have some questions. What version of Umbraco are you using? Are you using Webforms or MVC? Are you using XSLT or Razor for pulling out data from Umbraco.

    Are you planning to use the same background image on every page, or should it be possible to set an individual background image on the pages?

    Looking forward to hear from you.

    /Dennis

  • Ellie 17 posts 52 karma points
    Aug 12, 2014 @ 18:10
    Ellie
    0

    Hi Dennis,

    Actually I found my answer. I am working with Webform and XSLT 

    <head>

    <umbraco:Macro Alias='backgroundImage' runat='server'></umbraco:Macro>

    </head>

    <xsl:variable name="bggradient" select="umbraco.library:GetMedia($homeNode/headerBackgroundGradient, 0)"/>

    <xsl:template match="/">

    <style type="text/css">

    body {background: url(<xsl:value-of select="$bggradient/umbracoFile" />) repeat-x scroll 0% 0% #FFF;}

    </style>

    </xsl:template>

     

     

Please Sign in or register to post replies

Write your reply to:

Draft