17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 10107 Views |
-
Extending my site

26 September 2007 at 9:15am
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 www.mysite.com/admin/db/build?flush=1 and it did a bunch of processing, but I don't see anything new.
What might be going on, here?
-
Re: Extending my site

27 September 2007 at 1:38am
You might have to flush the backend as well so it reloads all new classes / configs.
(e.g. www.xxx.com/admin/cms?flush=1) -
Re: Extending my site

27 September 2007 at 7:58am
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:
<?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.
-
Re: Extending my site

27 September 2007 at 9:03am
Hi,
not sure if it makes any difference but when I add pageTypes I generally run www.xxx.com/db/build?flush=1 rather from under the admin section ie admin/db/build?flush=1
hey maybe worth a try.
regards
trevor
-
Re: Extending my site

27 September 2007 at 9:19am Last edited: 27 September 2007 9:20am
LOL..
Good one Trevor.. That has to be it.....
Your code should work UncleCheese...
-
Re: Extending my site

27 September 2007 at 9:40am
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.
-
Re: Extending my site

28 September 2007 at 12:22am
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 ;-)
-
Re: Extending my site

28 September 2007 at 2:13am
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?
| 10107 Views | ||
| Go to Top | Next > |


