# |
Aug 10th 2008, 00:44 |
tomas- |
thanks |
# |
Aug 10th 2008, 00:43 |
tomas- |
Veracious, yeah it will |
# |
Aug 10th 2008, 00:43 |
Veracious |
dunno if that's good or not though but should work |
# |
Aug 10th 2008, 00:43 |
tomas- |
Veracious, yeah if i have to... =( |
# |
Aug 10th 2008, 00:42 |
Veracious |
tomas-: how about: $this->redirect("/controller/action/$id") ? |
# |
Aug 10th 2008, 00:41 |
darki |
okay ;) |
# |
Aug 10th 2008, 00:41 |
Veracious |
in my code it's $role |
# |
Aug 10th 2008, 00:41 |
Veracious |
argh, that role is just any variable |
# |
Aug 10th 2008, 00:40 |
tomas- |
$this->redirect(array('action'=>'edit')); # Where would $id go? |
# |
Aug 10th 2008, 00:40 |
darki |
great thanx :) |
# |
Aug 10th 2008, 00:40 |
Veracious |
before the Model2->save() use this: role = $this->Model1->findByField($value) to get the knewly added data from the database |
# |
Aug 10th 2008, 00:40 |
tomas- |
how can i specify parameters to the 'redirect()' method given an array list of 'controller','action',etc? i need to append values to the pathinfo, not sure how |
# |
Aug 10th 2008, 00:38 |
Veracious |
oh, and before that |
# |
Aug 10th 2008, 00:38 |
Veracious |
of course |
# |
Aug 10th 2008, 00:38 |
Veracious |
then it does =) |
# |
Aug 10th 2008, 00:38 |
Veracious |
oh yeah |
# |
Aug 10th 2008, 00:38 |
darki |
maybe it does when i have foreign keys? |
# |
Aug 10th 2008, 00:38 |
Veracious |
you just add stuff in database |
# |
Aug 10th 2008, 00:38 |
Veracious |
the order does not matter |
# |
Aug 10th 2008, 00:38 |
Veracious |
yeah, if you want to |
# |
Aug 10th 2008, 00:37 |
Veracious |
for that to work |
# |
Aug 10th 2008, 00:37 |
darki |
and beffore that "$this->Model1->save" to save the first model |
# |
Aug 10th 2008, 00:37 |
Veracious |
and you need to have a relation defined in Model1 to Model2 |
# |
Aug 10th 2008, 00:37 |
Veracious |
darki: '$this->Model1->Model2->save()' to save the 2nd Model |
# |
Aug 10th 2008, 00:36 |
darki |
veracious: and then with "this->data->save()" all models are saved? |
# |
Aug 10th 2008, 00:35 |
skua |
what the best way to make a LIKE %$foo% filtering with conditions ? |
# |
Aug 10th 2008, 00:35 |
Veracious |
last one is in the controller |
# |
Aug 10th 2008, 00:35 |
Veracious |
'$form->create()' to create a form. '$form->input('Model1.field1)' and '$form->input('Model2.field1)' to make the form input elements. '$this->Model1->Model2->create()' to initialize the 2nd Model |
# |
Aug 10th 2008, 00:27 |
darki |
hi - how can i fill more than one model with data from one view? |
# |
Aug 10th 2008, 00:24 |
JD__ |
somebody has done what you need before or at least talked about it :) |
# |
Aug 10th 2008, 00:23 |
JD__ |
all day today i have thta, the api page and google up |
# |
Aug 10th 2008, 00:23 |
JD__ |
I have had great luck with book.cakephp.org |
# |
Aug 10th 2008, 00:08 |
mitnavn |
If it's the one I think it is, there's a bad review on amazon about the codeblocks having typos consistent throughout the book etc. |
# |
Aug 10th 2008, 00:02 |
redZoneDev |
anyone have a good/bad opinon of Apress's CakePHP book? http://apress.com/book/downloadfile/4066 .. i'm looking to learn cakephp and the stuff at book.cakephp.org isnt very mvc beginner-friendly |
# |
Aug 9th 2008, 23:55 |
tomas- |
np |
# |
Aug 9th 2008, 23:55 |
mitnavn |
Thanks again! |
# |
Aug 9th 2008, 23:54 |
tomas- |
http://book.cakephp.org/view/176/email |
# |
Aug 9th 2008, 23:53 |
mitnavn |
I haven't been able to find anything about it :/ Maybe I'm searching for the wrong keywords |
# |
Aug 9th 2008, 23:53 |
tomas- |
the file it looks for is actually /app/views/elements/email/text/template.ctp (dont forget the .ctp) |
# |
Aug 9th 2008, 23:53 |
tomas- |
the manual covers it pretty well |
# |
Aug 9th 2008, 23:53 |
tomas- |
yeah |