17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1042 Views |
-
impossible change new page type theme

24 October 2008 at 11:13pm
Hi!I have a problem with silverstripe in the rcreation of a new theme form my page.
all my site pagefollow page.ss template but I want create an homepage complitly different. so I create homepage.ss in theme/template/layout and in the css i use
#homepage #container{..}
#homepage #header {..}
#homepage #content {..}
nothing is change, what is wrong?please help me.. -
Re: impossible change new page type theme

25 October 2008 at 7:13am
Without seeing your code, can't say for sure, however a few things to note.
Make sure you put ?flush=1 at the end of your homepage URL to update the template.
Just because you made homepage.ss doesn't mean there is a CSS ID for it. If you want to use the code like that, make sure you do something like <body id="homepage"> in your template. Have you done that?
How you could make this dynamic is by using the variable $URLSegement in the id of the body. This outputs the page url for each page, so you could do this for any page you wanted.
Post more of your code or explain more if this doesn't fix it.
-
Re: impossible change new page type theme

25 October 2008 at 12:53pm
HomePage.ss will only apply for the 'HomePage' page type. Is your page actually a 'HomePage' type? Templates can't exist without a PHP class (apart from includes) to match them
-
Re: impossible change new page type theme

27 October 2008 at 9:06pm
I create HomePage.php as estension of Page .php
In HomePage.ss I put:<body id="$URLSegment">
<div id="Header"></div>
</body>In theme/css/layout.css I put:
(for Page.php)
#Header {
background-image: url(../images/old_image.jpg);
height: 289px;
width: 1000px;
}
(for HomePage.php)
#homepage-2 #Header{
background-image: url(../images/new_image.jpg);
width:1024px;
height: 249px;}
I want change HomePage in width, height and image compared with Page.ss
The result is taht ne_image appear in the container.Seems impossible modify header.
| 1042 Views | ||
|
Page:
1
|
Go to Top |



