Copied to clipboard

Flag this post as spam?

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


  • Paul Sørensen 304 posts 650 karma points
    Jan 12, 2009 @ 23:21
    Paul Sørensen
    0

    Change header image


    I would like the header image to change each time the user makes a new session and I would like to images to be in a alist administered by the administrator.

    Is there anybody who has tried something like that in Umbraco and knows how to do it ?

    Thanks
    Paul S

  • Ruben Verborgh 379 posts 30 karma points
    Jan 14, 2009 @ 14:49
    Ruben Verborgh
    0

    Hi Paul,

    You could have a folder in the Media section which contains the images, and set permissions for the administrator.

    Then, you could store a random number in a session variable at the start of the session, using either XSLT, standard ASP.Net code in your masterpage or an action handler.

    In your masterpage, you add a macro (or code in ASP.Net directly) which chooses an image based on the random number. For example, if your random number is r and your number of images if n, the picture displayed has number r % n.

    Cheers,

    Ruben

  • Paul Sørensen 304 posts 650 karma points
    Jan 14, 2009 @ 15:10
    Paul Sørensen
    0

    Thanks Ruben

    I sounds like a good idea using XSLT - the existing nails. Any examples of how to do something like that ?

    Thanks
    Paul S

  • Ruben Verborgh 379 posts 30 karma points
    Jan 14, 2009 @ 17:10
    Ruben Verborgh
    0

    Hi Paul,

    I don't have an example here unfortunately. But it should be an easy task, and if you get stuck we could help you out here.

    Cheers,

    Ruben

  • Paul Sørensen 304 posts 650 karma points
    Jan 19, 2009 @ 12:17
    Paul Sørensen
    0


    I'm not quiet sure of how to make the list of images so that I can acces them from XSLT

    Paul S

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies