# |
Sep 11th 2009, 12:27 |
benlieb |
$this->controller =and new AppController(); |
# |
Sep 11th 2009, 12:27 |
benlieb |
function __construct($method, $messages) { |
# |
Sep 11th 2009, 12:27 |
benlieb |
class AppError extends ErrorHandler { |
# |
Sep 11th 2009, 12:27 |
benlieb |
<?php |
# |
Sep 11th 2009, 12:27 |
benlieb |
so far I have this: |
# |
Sep 11th 2009, 12:27 |
unclezoot |
course |
# |
Sep 11th 2009, 12:26 |
lukas |
is it possible to tell cake which model file to use manually? |
# |
Sep 11th 2009, 12:26 |
unclezoot |
build your own error layout + handler |
# |
Sep 11th 2009, 12:22 |
benlieb |
my app loads some objects in the app_controller::beforeFilter() that are necessary to make the layout work (menus and such), however when showing missingController errors, this is not run, so the layouts fail with fatal errors. HOw can I avoid this? |
# |
Sep 11th 2009, 12:20 |
benlieb |
I have a question for any experts out there.... |
# |
Sep 11th 2009, 12:08 |
ChipotleCoyote |
~bin |
# |
Sep 11th 2009, 12:08 |
Styles |
Hey |
# |
Sep 11th 2009, 11:57 |
crayfishuk |
lots of learning today!! Many thanks for the help/responses/feedback/slapdowns ;) |
# |
Sep 11th 2009, 11:56 |
TehTreag |
fumanchu182: array('div'=>false, 'label'=>false,...); |
# |
Sep 11th 2009, 11:56 |
fumanchu182 |
in the options array 'div'=>'' |
# |
Sep 11th 2009, 11:55 |
fumanchu182 |
i figured it out |
# |
Sep 11th 2009, 11:53 |
fumanchu182 |
when working with formHelper is there a way to tell it to not wrap form elements in a div tag when using input(...)? |
# |
Sep 11th 2009, 11:30 |
Scotto |
oh ok that makes things easy |
# |
Sep 11th 2009, 11:30 |
palam |
Scotto: if you are going to cache, then request action is your only option :) |
# |
Sep 11th 2009, 11:30 |
Scotto |
well it might be a good idea to cache this element if it isnt going to change too often |
# |
Sep 11th 2009, 11:29 |
Scotto |
http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction |
# |
Sep 11th 2009, 11:29 |
palam |
Scotto: don't know much about that, but unless you are going to cache, i don't think it'll be any different |
# |
Sep 11th 2009, 11:29 |
Scotto |
palam: would using requestAction be more efficient? |
# |
Sep 11th 2009, 11:26 |
palam |
Scotto: yes, so it's more efficient |
# |
Sep 11th 2009, 11:26 |
Scotto |
ah so make the find not work for specific controllers |
# |
Sep 11th 2009, 11:25 |
palam |
if there is a controller or action that you don't require it, you can do it by testing $this->params['controller' |
# |
Sep 11th 2009, 11:25 |
palam |
do the find in your app_controller's beforeFilter method |
# |
Sep 11th 2009, 11:24 |
Scotto |
palam: can you rephrase that last comment? |
# |
Sep 11th 2009, 11:24 |
palam |
Scotto: even if it is most of them, you can do a check and find when required |
# |
Sep 11th 2009, 11:24 |
Scotto |
but most of the public accessible pages |
# |
Sep 11th 2009, 11:23 |
Scotto |
palam: not all of them |
# |
Sep 11th 2009, 11:23 |
palam |
then find and set in app_controller |
# |
Sep 11th 2009, 11:23 |
palam |
Scotto: you have it in all your pages? |
# |
Sep 11th 2009, 11:23 |
Scotto |
palam: what controller? |
# |
Sep 11th 2009, 11:23 |
Scotto |
i have a "recent news" element which needs to be in a static view |
# |
Sep 11th 2009, 11:22 |
palam |
why can't you run the find in the controller and set it? you can access it in an element you call from a view |
# |
Sep 11th 2009, 11:21 |
Scotto |
palam: might be good to cache it but isnt neccessary right now |
# |
Sep 11th 2009, 11:21 |
Scotto |
so i have to create a controller for 'pages'? |
# |
Sep 11th 2009, 11:21 |
palam |
Scotto: you mean cached? |
# |
Sep 11th 2009, 11:21 |
Scotto |
than how do i get the data i need into the element, when the view that the element is in, is static? |
# |
Sep 11th 2009, 11:21 |
palam |
you do finds in controllers or models |