Jump to:

3435 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » flush issue new pagetype

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

Page: 1
Go to End
Author Topic: 1804 Views
  • xtoc
    Avatar
    Community Member
    1 Post

    flush issue new pagetype Link to this post

    Hi

    I got a problem with flushing my database.

    I made a new site under themes/miisound/
    If i update the template after a change with ?flush=1 It works perfectly.

    But i added a php file (HomePage.php)under themes/miisound/code/ as the tutorial told me to do.
    (http://doc.silverstripe.org/doku.php?id=tutorial:1-building-a-basic-site).
    When i do this: www.miisound.com/db/build?flush=1 , i see that it will run the script but no changes has been made. I also checked the backend and no other page type or contenttype has been added.

    I tried to add another one in the code folder sitemap.php from another tutorial. but still nothing change after the flush.

    What can this problem be?

    Kind Regards
    Peter Colemonts

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: flush issue new pagetype Link to this post

    Hi xtoc, welcome to silverstripe

    In the tutorial they are working in the 'tutorial' folder, which is the equvelent of the 'mysite' folder under normal development. However when working with themes you use the 'themes' folder to store your templates/images/css in, but all your code/javascript still goes into the 'mysite' folder.

    SS will not pick up code that is in a folder which has no _config.php file, hence putting it into mysite

    so in short, move your HomePage.php to the mysite/code folder

  • burgessb
    Avatar
    Community Member
    17 Posts

    Re: flush issue new pagetype Link to this post

    I know this is crazy, but my new pagetypes are not showing up either. I've placed my php file in the mysite/code directory, and flushed about a zillion times, both the cms, and the site.

    I'm using forum v-0.1.2 and v-2.3 of SS.

    Is there any other issues with this not working out there, or any other tricks to try? Thanks!

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: flush issue new pagetype Link to this post

    In the folder miisound/, did you create an empty _config.php file? The presence of a _config.php file tells SilverStripe that there is stuff in the code directory to process. If you don't have the _config.php file, SilverStripe will simply ignore anything in the code directory.

  • burgessb
    Avatar
    Community Member
    17 Posts

    Re: flush issue new pagetype Link to this post

    Hamish,
    I simply put my new pagetype under the mysite/code directory. There is a _config.php file there already. Is there some code I need to put in there?

    Thanks for the help.

    1804 Views
Page: 1
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.