Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

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

Extending my site

Go to End

17 Posts   10532 Views


26 September 2007 at 9:15am 4085 Posts

I'm trying to extend my site to include an employee page, where users could upload a photo and enter a bio. I've created the class extensions in EmployeePage.php, but it doesn't seem to be updating the database because my new page type doesn't appear in the dropdown menu in the Behaviors tab.

I went to and it did a bunch of processing, but I don't see anything new.

What might be going on, here?


27 September 2007 at 1:38am Community Member, 787 Posts

You might have to flush the backend as well so it reloads all new classes / configs.


27 September 2007 at 7:58am 4085 Posts

No luck. I checked my DB, too, and it doesn't appear to have done anything. This is what I have defined in /code/EmployeePage.php:

* Defines the EmployeePage type

class EmployeePage extends Page {

   static $db = array (
      'Title' => 'Text',
      'Bio' => 'Text'
   static $has_one = array (


class EmployeePage_controller extends Page_controller {



This should work, right? I'm following the tutorial for expanding a basic site.


27 September 2007 at 9:03am 53 Posts


not sure if it makes any difference but when I add pageTypes I generally run rather from under the admin section ie admin/db/build?flush=1

hey maybe worth a try.




27 September 2007 at 9:19am (Last edited: 27 September 2007 9:20am), Community Member, 787 Posts


Good one Trevor.. That has to be it.....

Your code should work UncleCheese...


27 September 2007 at 9:40am 53 Posts

hey i'm new to this only trying to help :)

So enlighten me if its not correct and the reason why instead of taking the mick.

I had this happen but then try again or do different things and then seems to work like logging out and back in and the page types are there maybe a cache thing didn't write everything down that did or didn't work.


28 September 2007 at 12:22am Community Member, 787 Posts

no no no !

I wasn't laughing at you !! I laughed at the situation that we totally missed the incorrect URL and were focussing on the code itself.

Sorry for the misunderstanding there ;-)


28 September 2007 at 2:13am 4085 Posts

Okay! The new URL should definitely work. I get prompted for a username and password when I navigate to it, though, and NOTHING WORKS!!!

I've tied my CMS login, my database login, and everything else imaginable. What's the deal? Where can I find this information?

Go to Top