Jump to:

23370 Posts in 18160 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » Can't build template for the home page

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2
Go to End
Author Topic: 2543 Views
  • Three Dog
    Avatar
    Community Member
    6 Posts

    Re: Can't build template for the home page Link to this post

    http://doc.silverstripe.com/doku.php?id=debugging#dev_mode says that by default, sites running on localhost are set in dev mode. And my site ran on localhost.

  • sasky
    Avatar
    Community Member
    2 Posts

    Re: Can't build template for the home page Link to this post

    Hey I have this problem too, and i think it is because the tutorials folder does NOT contain a config.php file,
    so I went into the mysite folder, where there is one, and copied and pasted it into the tutorials folder.

    Now I dont know what that php means. The only thing I changed was the line at the top from

    global $project;
    $project = 'mysite';

    to

    global $project;
    $project = 'tutorial';

    it kinda worked, as in it made the homepage table. but it got confused because it said i have two page files

    Warning: Warning: there are two 'Page' files both containing the same class: 'C:/wamp/www/SilverStripe-v2.2.3/tutorial/code/Page.php' and 'C:/wamp/www/SilverStripe-v2.2.3/mysite/code/Page.php'. This might mean that the wrong code is being used. in C:\wamp\www\SilverStripe-v2.2.3\sapphire\core\ManifestBuilder.php on line 253

    so how do you point the config file towards the tutorial folder?

    please update silverstripe so the right config folder appears in the tutorial folder, because this is creating a lot of confusion.

    am I right with this analysis?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Can't build template for the home page Link to this post

    If you install SS and what do run through the tutorial then make sure you select the 'Tutorial' theme option on the install screen. Depending on whether you install with the 'BlackCandy' or the 'Tutorial' theme options determines where SilverStripe creates the _config.php file. If you want to swap between the 2 make sure you copy the file as you have done and edited the $project var but you also need to remove the old _config file (eg the one in mysite if you want to use the tutorial code'.

    This has been tidied up in 2.3. All the code (tutorial or not) will be stored in mysite so you won't need to worry about it once that gets released and we will update the tutorials then.

  • sasky
    Avatar
    Community Member
    2 Posts

    Re: Can't build template for the home page Link to this post

    oh ok great, that helps.

    I think I did choose the tutorial option when installing though. But maybe I didn't.

    Cheers

    2543 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.