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.

Themes /

Discuss SilverStripe Themes.

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

Selecting HomePage.ss in theme


Go to End
Reply


15 Posts   4042 Views

Avatar
Juanitou

Community Member, 323 Posts

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.

Avatar
onhamotminh

Community Member, 4 Posts

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

Attached Files
Avatar
onhamotminh

Community Member, 4 Posts

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!

Avatar
AL

Community Member, 7 Posts

26 February 2011 at 2:23am

Edited: 26/02/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?

Avatar
AL

Community Member, 7 Posts

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=1

I'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

Avatar
suganya

Community Member, 9 Posts

27 March 2014 at 8:08pm

Hi,

I tried both http://localhost/mysite/index.php/dev/build/?flush=1 and http://localhost/mysite/dev/build/?flush=1 still getting error.

Please help me.

Thanks in advance.

Avatar
thomas.paulson

Community Member, 84 Posts

28 March 2014 at 5:52pm

Edited: 30/03/2014 5:04pm

Hi Suganya

Try dev/build and ?flush=1 separately! :D

I believe you should access folder SS project folder, not localhost/mysite

Go to Top