Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Selecting HomePage.ss in theme

Discuss SilverStripe Themes.

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

Page: 1 2
Go to End
Author Topic: 3413 Views
  • arthurdent
    Avatar
    Community Member
    132 Posts

    Selecting HomePage.ss in theme Link to this post

    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
  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    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.

  • arthurdent
    Avatar
    Community Member
    132 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    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?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    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.

  • arthurdent
    Avatar
    Community Member
    132 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    Thanks! That sorted it!

  • onhamotminh
    Avatar
    Community Member
    4 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    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
  • Juanitou
    Avatar
    Community Member
    322 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    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

  • onhamotminh
    Avatar
    Community Member
    4 Posts

    Re: Selecting HomePage.ss in theme Link to this post

    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

    3413 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.