Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Different header pictures for menu label

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1866 Views
  • vinz
    Avatar
    Community Member
    13 Posts

    Different header pictures for menu label Link to this post

    Hi there,
    i would like to have for each page a different picture in the header.... llike... home-->pic1 ; about us-->pic2, etc.
    How can I do it with css?
    could someone giv eme a help. Could you also give me some code or a web page to show me the result...
    thx in advance for any help.

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Different header pictures for menu label Link to this post

    I would just set an ID on your body tag and then use css to style specific pages.

    So something like <body id="$URLSegment"> in your template, and then your css

    #header{background:imageurl;} //default image

    #segment1 #header {background:imageurl;}

    #segment2 #header{background:imageurl;}

    Then your html header should be <div id="#header">Stuff</div>

    If you add new pages, you'd have to manually update your css stylesheet, or it'll give the default image.

    You could also search the forum, I believe there was a method which allows you to upload and handle the images per page in the backend CMS. Depends on which way you wanna go.

  • vinz
    Avatar
    Community Member
    13 Posts

    Re: Different header pictures for menu label Link to this post

    Hi LeeUmm,
    sorry but could you explain me better what I should do..sorry. I have no idea which file I should change and what I have to change to make it work, I'm not so confident with silverstripe and css...
    Hope you can give me a help..
    thx

    1866 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.