1259 Posts in 348 Topics by 484 members
| Go to End | ||
| Author | Topic: | 2853 Views |
-
Re: Selecting HomePage.ss in theme

10 March 2010 at 6:55am
Hi!
Well, are you sure welcome.png is there? The URL is correct. I guess you flushed the cache…
I suggest you to check the page source and verify that the div banner is there, so to confirm that the problem is the image not being loaded.
-
Re: Selecting HomePage.ss in theme

10 March 2010 at 3:41pm
Hi Juan!
step1:
Create HomePage.php (path /mysite/code/):
<?php
/**
* Defines the HomePage page type
*/class HomePage extends Page {
static $db = array(
);
static $has_one = array(
);}
class HomePage_Controller extends Page_Controller {
}
?>step2 : run http://localhost:82/silverstripe/dev/build?flush=1
step 3 : Home Page assigned it to page type HomePage created (step2)
step 4 :
i checked image welcome.png correct with path as well as div banner (attach file)
Create HomePage.ss (path /themes/tutorial/templates/Layout/ and i tried with path /themes/tutorial/templates/ ):
<div id="Banner">
<img src="themes/tutorial/images/welcome.png" alt="Homepage image" />
</div>
<div id="Content" class="typography">
$Content
</div>step 5: I flushed the cache by http://localhost:82/silverstripe/?flush=1
My home page is not change with new layout. Please, Can you guide me which mistake ? Thanks Juan
-
Re: Selecting HomePage.ss in theme

10 March 2010 at 10:08pm
Thanks Juan
I changed home page with new template. Because first install, I was not selected template(empty) to begin tutorial.
Thanks again!
-
Re: Selecting HomePage.ss in theme

26 February 2011 at 2:23am Last edited: 26 February 2011 2:24am
I'm having problems with this /dev/buid/?flush=1.
My development address for my site is http://localhost/SilverStripe/.
I've created the HomePage.php in mysite/code folder, I've pasted the code from tutorial.
When I try to run "http://localhost/SilverStripe/dev/build/?flush=1" I get stuck with:"Not Found
The requested URL /SilverStripe/dev/build/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
What can I do next?
-
Re: Selecting HomePage.ss in theme

26 February 2011 at 2:29am
Me again.
I've solved it
You have to look carefully at the site address.
http://localhost/SilverStripe/index.php/dev/build/?flush=1I've tryed only with http://localhost/SilverStripe/dev/build/?flush=1 (without index.php in it)
On local server I don't have apache rewrite_mode set on...
Regards
| 2853 Views | ||
| Go to Top |

