# |
Sep 13th 2009, 14:44 |
HardPhuck |
to render a custom view |
# |
Sep 13th 2009, 14:41 |
ionas82 |
question is why you want to do that |
# |
Sep 13th 2009, 14:41 |
ionas82 |
http://book.cakephp.org/view/57/Controller-Methods#render-428 |
# |
Sep 13th 2009, 14:40 |
HardPhuck |
$this->render will do the job i think |
# |
Sep 13th 2009, 14:40 |
HardPhuck |
use different view files based on params in action |
# |
Sep 13th 2009, 14:40 |
ionas82 |
HardPhuck, what do you want to do |
# |
Sep 13th 2009, 14:40 |
ionas82 |
reconfigure router, use elements |
# |
Sep 13th 2009, 14:40 |
HardPhuck |
lol |
# |
Sep 13th 2009, 14:40 |
ionas82 |
HardPhuck, rename the action? |
# |
Sep 13th 2009, 14:37 |
HardPhuck |
how can i assign a different view to the action |
# |
Sep 13th 2009, 14:35 |
ionas82 |
use the book search, book is awesome, good luck |
# |
Sep 13th 2009, 14:35 |
NoReGreT |
ionas82: thanks |
# |
Sep 13th 2009, 14:34 |
jway |
I will try :) |
# |
Sep 13th 2009, 14:33 |
ionas82 |
then digg for complex find conditions and containable / contain / contains |
# |
Sep 13th 2009, 14:33 |
ionas82 |
jway, I think you should setup a basic association by the book and see how find is used there |
# |
Sep 13th 2009, 14:32 |
ionas82 |
but it makes sense the way it is as well |
# |
Sep 13th 2009, 14:32 |
ionas82 |
or Controller |
# |
Sep 13th 2009, 14:32 |
ionas82 |
afterFilter afterAction |
# |
Sep 13th 2009, 14:32 |
ionas82 |
beforeRender = beforeView |
# |
Sep 13th 2009, 14:32 |
ionas82 |
beforeFilter you could "name" beforeAction |
# |
Sep 13th 2009, 14:32 |
ionas82 |
the naming is pretty self explaining |
# |
Sep 13th 2009, 14:31 |
ionas82 |
there you see the callbacks as well |
# |
Sep 13th 2009, 14:31 |
ionas82 |
http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf |
# |
Sep 13th 2009, 14:30 |
ionas82 |
I think yes |
# |
Sep 13th 2009, 14:30 |
ionas82 |
NoReGreT, http://book.cakephp.org/view/21/A-Typical-CakePHP-Request |
# |
Sep 13th 2009, 14:29 |
NoReGreT |
ionas82: you mean the blue lines which are callbacks? |
# |
Sep 13th 2009, 14:29 |
jway |
thanks a lot |
# |
Sep 13th 2009, 14:29 |
ionas82 |
see book "contain" or "contains" |
# |
Sep 13th 2009, 14:29 |
ionas82 |
jway, I'd go for containable for now |
# |
Sep 13th 2009, 14:29 |
NoReGreT |
ionas82: yeah, but no mentioning of beforeFilter |
# |
Sep 13th 2009, 14:29 |
jway |
but what about the right way, should I just look up linkable behaviour? |
# |
Sep 13th 2009, 14:28 |
jway |
aha |
# |
Sep 13th 2009, 14:28 |
ionas82 |
[21:48] <ionas82> http://book.cakephp.org/img/typical-cake-request.gif |
# |
Sep 13th 2009, 14:28 |
ionas82 |
did you see the graphic |
# |
Sep 13th 2009, 14:28 |
ionas82 |
NoReGreT, correct |
# |
Sep 13th 2009, 14:28 |
ionas82 |
if your assocs are right then, it would work |
# |
Sep 13th 2009, 14:28 |
jway |
Tampie, yes I added belongsTo in the Comment model |
# |
Sep 13th 2009, 14:28 |
ionas82 |
the "wrong" way $this->Model->recursive=2; |
# |
Sep 13th 2009, 14:28 |
NoReGreT |
ionas82: so when the action is called, beforeFilter is processed then does the action ? |
# |
Sep 13th 2009, 14:28 |
ionas82 |
if you want to walk deep through model associations |
# |
Sep 13th 2009, 14:27 |
ionas82 |
jway if you want to do it "right" use containable or linkable behaviors |