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.

Themes /

Discuss SilverStripe Themes.

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

Selecting HomePage.ss in theme


Go to End


15 Posts   7924 Views

Avatar
mhdesign

Community Member, 216 Posts

14 November 2009 at 5:27pm

Edited: 14/11/2009 5:36pm

I'm confused...

In the SilverStripe template basic theme tutorial, we are told to change the behavior of the page that we would like to be homepage to use the HomePage.ss template through the drop-down list. However I only have three items on the list for my theme, none of which says 'HomePage' -- is it just me or what's going on? Can anybody help here?

Attached Files
Avatar
yurigoul

Community Member, 203 Posts

14 November 2009 at 10:13pm

The tutorial says: "To illustrate how we do this, we will create a new template for the homepage."

You will have to create it yourself and then flush the database etc. It is all explained in there.

Avatar
mhdesign

Community Member, 216 Posts

14 November 2009 at 10:30pm

Thanks for your response Yurigoul - got me looking things over again more carefully. Have added the HomePage.php file to mysite/code. However when I click the link http://localhost/dev/build?flush=1 I get a 404 page! My development address for my site is http://localhost/Sites/SilverStripe/?flush=1, so I'm wondering if this is a factor? Do you have any further pointers?

Avatar
bummzack

Community Member, 904 Posts

14 November 2009 at 11:26pm

Your URL would then be : http://localhost/Sites/SilverStripe/dev/build?flush=1

Always append the /dev/build to the URL of your SilverStripe install.

Avatar
mhdesign

Community Member, 216 Posts

15 November 2009 at 11:31am

Thanks! That sorted it!

Avatar
onhamotminh

Community Member, 4 Posts

9 March 2010 at 11:17pm

Edited: 09/03/2010 11:19pm

Hi All

In the SilverStripe template basic theme tutorial, I did as the guide however home page not change theme

HomePage.ss (path \themes\tutorial\templates and a copy at themes\tutorial\templates\layout)
<div id="Banner">
<img src="/themes/tutorial/images/welcome.png" alt="Homepage image" />
</div>
<div id="Content" class="typography">
$Content
</div>

I was tried run /dev/build?flush=1 and dev/build?flush=all but it was not run theme HomePage.ss. Can you help me? (SS version 2.3.6)

Attached Files
Avatar
Juanitou

Community Member, 323 Posts

9 March 2010 at 11:41pm

Hi!

Have you created a HomePage page type as explained in the tutorial and assigned it to your Home Page?

Also, don’t put HomePage.ss in \templates.

Hope it helps,
Juan

Avatar
onhamotminh

Community Member, 4 Posts

10 March 2010 at 4:20am

Edited: 10/03/2010 4:37am

thanks Juan

as image ss.png. I created HomePage page type and assigned it to my Home Page. I was deleted HomePage.ss in \templates. Only HomePage.ss have at \templates\layout. but home page also not show welcome image.

help me please,
Trung

Go to Top