Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » problem in change homepage theme

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: 1455 Views
  • ojalà
    Avatar
    Community Member
    87 Posts

    problem in change homepage theme Link to this post

    Hi!
    I want to create a new theme for homepage (different from home, contact, about us page of my site). To do that I create a new page type HomePage.php following first tutorial. Then I create Homepage.ss. Here I want change header ad footer so this is my Homepage.ss file:

    <div id="Header" class="new_images">
                <img src="mysite/images/logo.gif" alt="Homepage image" />
             </div>
             <div id="ContentContainer">
                <div id="Content" class="typography">
                   $Content
                   $Form
                </div>
             </div>
             <div id="Footer">
                <img src="mysite/images/villa_copertina.jpg" alt="Homepage image" />
             </div>

    I can't see changes. Why? I modifiy /theme/css/layout.css file an I rewrite #header as #header.newimages. Is this correct?

  • ojalà
    Avatar
    Community Member
    87 Posts

    Re: problem in change homepage theme Link to this post

    It's seems that is impossible to apply modify to header and footer, I can change only the content div.

  • Double-A-Ron
    Avatar
    Community Member
    603 Posts

    Re: problem in change homepage theme Link to this post

    How are those header and footer divs different to your Page.ss header and footer?

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: problem in change homepage theme Link to this post

    Why are you rewriting it as #header.newimages? Where is newimages coming from?

    Also, the class has a capital H in your div code, but only a lowercase h in the stylesheet.

    The URLSegement returns the page url name, so for example about-us

    Thus if you used it in the id of the body tag, you'd rewrite the CSS as follows

    #about-us #Header{ stuff };

  • ojalà
    Avatar
    Community Member
    87 Posts

    Re: problem in change homepage theme Link to this post

    ok!I try, but I can't ovverride the Header of Page.ss, the new Header is near the other, why?

  • ojalà
    Avatar
    Community Member
    87 Posts

    Re: problem in change homepage theme Link to this post

    I try explain better: the width of my site is 900px so header, content and body have this extension. I want change homepage and make everythig of 1500px because my homepage is completly different. So my problme is that every change doesn't ovverride Page.ss but is near the layout of page.ss

    1455 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.