Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

problem in change homepage theme


Go to End


6 Posts   1824 Views

Avatar
ojalà

Community Member, 87 Posts

15 October 2008 at 11:06pm

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?

Avatar
ojalà

Community Member, 87 Posts

16 October 2008 at 2:17am

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

Avatar
Double-A-Ron

Community Member, 607 Posts

16 October 2008 at 12:06pm

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

Avatar
Liam

Community Member, 470 Posts

16 October 2008 at 6:15pm

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 };

Avatar
ojalà

Community Member, 87 Posts

24 October 2008 at 8:15pm

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

Avatar
ojalà

Community Member, 87 Posts

24 October 2008 at 8:28pm

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