22848 Posts in 9653 Topics by 2803 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
|Go to End|
8 January 2010 at 12:58pm
Howdy doo. I've inherited a project for a client that is built on SilverStripe & this is my first time using it. I've been reading the book, the tutorials, and these forums, along with diving head first into the code, and I'm definitely making progress.
Unfortunately I've run into a problem I can't figure out & it seems like the solution will be something silly I've overlooked.
I created a new page type, CofExPage, and a new layout (the entire site uses 1 template with just a few layouts for other pages). I flushed everything & was able to select the new page type for the page I'm trying to redesign but after publishing it, when I go to the page, all it says is "CofExPage". Nothing else renders, no errors, no content, nada. I view-source and that's all that it's spitting out: "CofExPage", the name of my layout/page type.
Files I added:
CofExPage.php in /mysite/code
CofExPage.ss in the theme directory, in /templates/Layout
The other layouts & the rest of the site work fine (everything worked fine until I started mucking around!)
Any help would be greatly appreciated.
8 January 2010 at 1:03pm
Scratch that! Figured it out, and if any other beginners run into the problem:
CofExPage.php, I declared the controller
class CofEx_Controller extends Page_Controller
Should have been
class CofExPage_Controller extends Page_Controller
I left out the "Page".... d'oh. Make sure all those names match up!
|Go to Top|