$leaves = array_diff($candidates, $parents);
return $leaves;
}
Instead of calling:
$this->data = $this->Page->findAllThreaded($conditions, $fields,
$sort);
...call:
$this->data = $this->Page->getTree($conditions, $fields, $sort);
I hope this helps others having simil
Agreed,
Jcs is correct, data-related tasks should be taken care of in the
model. In this case, you could re-use the getArea method in your model
like so:
function getArea($id)
{
$this->id = $id;
switch ($this->data['type'])
{
;area'] = $this->Shape->getArea();
}
$this->data = array_merge($this->data, $extra);
$this->set('data', $this->data);
}
}
?>
Unfortunately, I haven't tested this code, but I hope it gives you an
idea or two :
-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
Add those lines to a .htaccess file in the www directory of the
webserver and see if that helps. Reply here if you don't get the
desired result.
Cheers;
Poncho
On Apr 19, 7:
NULL
titlevarchar(255)YES
NULL
slug varchar(255)YES NULL
content text
created datetime
-00-00 00:00:00
modified datetime
-00-00 00:00:00
Cheers;
Poncho
--~--~-~--~~~---
Hey Ian,
That code looks pretty nice, could you post the newer version you
mentioned?
Cheers;
Poncho
On Apr 15, 2:41 pm, "ianh" <[EMAIL PROTECTED]> wrote:
> There is
> this:http://groups.google.co.uk/group/cake-php/browse_thread/thread/6257c7...
> which gives a meth
rs();
return true;
}
Unfortunately, when I run the form with some data (with fields such as
'daytime_phone', 'evening_phone', 'fax'), the form is repopulated with
the data without being reformatted and I get the following message
logged:
2007-04-15 12:20:0
Open "{cakeapp}/config/routes.php"
Lets say the page you want the root of your site to point to "/pages/
display/home"
$Route->connect('/', array('controller' => 'pages', 'action' =>
'display', 'home'));
That would be if you are using the built-in PagesController. For my
current project I creat
eate a symlink of your "mysite" directory and move it to "/
Library/WebServer/Documents/"
Now your website should be accessible from "http://localhost/mysite/";
I hope that makes some kind of sense to you.
Cheers;
Poncho
On Apr 7, 7:09 pm, "jofftan" &
I don't think switching from Prototype / Scriptaculous is such a good
idea unless you are familiar with the framework in question (moo.fx).
This is mainly because all of the ajax functionality built into cake
is dependant on the Prototype / Scriptaculous scripts.
By all means read up on the moo.f
tance if you have a method
named "getUserName", and one named "getUserLevel" and you type "get"
and press "[escape]", TextMate will cycle through any text that starts
with "get" until you have the desired result. It is very handy indeed.
Cheer
The database abstraction code has a method "lastError" that you could
call, something like this:
{$this->name}->lastError();
return $error;
}
?>
This is untested, but I think it'll work :-)
Cheers;
Poncho
--~--~-~--~~~---~--~~
Y
I'm only guessing here but do you have the Session component loaded
into your AppController?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegrou
John David Anderson (_psychic_) wrote:
> On Jul 6, 2006, at 2:43 PM, Poncho wrote:
>
> >
> > I was a long-time user of Dreamweaver (in code-view, mainly for
> > code-completion and syntax highlighting) until I discovered TextMate
> > about a year ago.
> >
>
I was a long-time user of Dreamweaver (in code-view, mainly for
code-completion and syntax highlighting) until I discovered TextMate
about a year ago.
I also use the Cake.bundle by sdevore. It totally rocks my world and
saves me so much time with the ability of setting up snippets for
anything I
15 matches
Mail list logo