21277 Posts in 5728 Topics by 2599 members
|Go to End|
12 January 2012 at 5:00am
I've been following the excellent tutorial here: http://doc.silverstripe.org/sapphire/en/tutorials/1-building-a-basic-site which is very clear, but I have a problem.
I've created a new file inside mysite/code and and pasted in the code from the tutorial above. I then flushed my database using the url http://localhost/silverstripe/?flush=1
But when I go back into the admin system (I refreshed the page first), choose a page and go to "behaviours", the page type dropdown doesn't show my new page type.
Is there an additional step that I'm missing?
12 January 2012 at 6:42am
- did you add the new pagetype to the theme?
ex. if you have /mysite/code/newpage.php
you also need /themes//themename/templates/Layout/newpage.ss
and then refresh the page and it should show up
12 January 2012 at 6:57am
Hi thanks for the reply, I've tried this to no avail. I'm not actually sure if it does need a file in the template directory, the tutorial shows that you can select the new page type before a template is created. Also at the bottom of the tutorial it says "We can then delete themes/tutorial/templates/HomePage.ss, as it is no longer needed."
I thought this could be a problem with my browser's cache, but I've tried it in a different browser and it still doesn't show.
12 January 2012 at 7:20am
I just looked through the tutorial, havent actually read it for a long time,
you can definitely get rid of
but you need
also, I noticed you wrote http://localhost/silverstripe/?flush=1
when I flush - I always have http://localhost/dev/build?flush=1
or if in a subdirectory http://localhost/silverstripe/dev/build?flush=1
or I usually do flush=all
see if you get a database build success.
12 January 2012 at 10:11pm
Oh! I was going to the wrong address, I thought /dev was the folder of the application, where I'd unoriginally called mine "silverstripe". If I go to that url it shows me the db has been rebuilt. Much better!
Thanks very much!
|Go to Top|