Re: Basic data fetching

2014-08-28 Thread Stephen S
I would recommend changing recursive to -1 in the AppModel and using Containable, this way the only data you receive is the data you actually request and could possibly help your application in terms of speed by switching this off.

Re: Basic data fetching

2014-08-28 Thread Stephen S
'options' = $devices, sorry. On 28 August 2014 07:07, Stephen S hellospeak...@gmail.com wrote: I would recommend changing recursive to -1 in the AppModel and using Containable, this way the only data you receive is the data you actually request and could possibly help your application in

Re: Smarty with Cakephp 2.XX .

2014-08-28 Thread Dakota
PHP is a template engine, and CakePHP leverages it as such. Any particular reason why you want to run something else on top of PHP? On Wednesday, 27 August 2014 12:48:14 UTC+2, sandee...@gmail.com wrote: Can anybody tell how to use Smarty with Cakephp 2.XX . Is good? Any other good template

Re: migration issue

2014-08-28 Thread Dakota
Hi Dallas, Have you tried running the CakePHP 2 upgrade shell? http://book.cakephp.org/2.0/en/console-and-shells/upgrade-shell.html#upgrade-shell It does about 90% of the grunt work for you, renames directories, moves files, search and replace things like $html to $this-Html, etc. On

Re: How to get controller name from an element view?

2014-08-28 Thread Jipson Thomas
Hi , I tried this solution to get controller name on my layout file, but I am getting an error on CakePHP3 as follows, *Error: * *paramsHelper* could not be found. IS there anyone know a proper solution for this? Regards, Jipson On Friday, 8 February 2008 19:30:35 UTC, Guill3rmo wrote: Hi im

Get controller name on layout file - CakePHP3

2014-08-28 Thread Jipson Thomas
Hi, In my Cakephp 3 project on the layout file, I want to set menu classes based on the current controller name. After a search I tried to get it through the following command on my layout.ctp file ?php echo $this-params['controller']; ? But it throughs me an error as following *Error: *

Re: How to get controller name from an element view?

2014-08-28 Thread Stephen S
I don't think you can use the request object from within an element, but here's the documentation on it. http://book.cakephp.org/3.0/en/controllers/request-response.html#request-parameters If you can't access it from the element you can save it as a variable in your AppController, though this

Re: Get controller name on layout file - CakePHP3

2014-08-28 Thread Thomas von Hassel
you have to look in `$this-request` instead On 28 Aug 2014, at 14:35, Jipson Thomas jip...@strategic-ic.co.uk wrote: Hi, In my Cakephp 3 project on the layout file, I want to set menu classes based on the current controller name. After a search I tried to get it through the following

Re: How to get controller name from an element view?

2014-08-28 Thread Jipson Thomas
Thank you. I got it working by the following command. $this-request-params['controller'] Thanks, Jipson On Friday, 8 February 2008 19:30:35 UTC, Guill3rmo wrote: Hi im newbie and my English still sucks, but i want to know get the controller name since an element view. Thanks. -- Like Us

Re: Get controller name on layout file - CakePHP3

2014-08-28 Thread Jipson Thomas
Thank you very much. I got it working using the following command $this-request-params['controller'] Regards, Jipson On Thursday, 28 August 2014 13:42:54 UTC+1, Thomas von Hassel wrote: you have to look in `$this-request` instead On 28 Aug 2014, at 14:35, Jipson Thomas

Paginate Sort on columns from related tables

2014-08-28 Thread John Sposato
We are having some issues getting this to work, is it possible? For example, We have a Patient model with a HABTM relationship to CareGiver. And a PatientCase model that belongs to Patient with the hasMany to it from Patient. Both HABTM relationships are setup and are correct. On the

Re: migration issue

2014-08-28 Thread 'Dallas' via CakePHP
I am going to try this - I have been avoiding it because I host my site on a shared server and I do not know how to use the console to bake the shells or anything else. So I will go back to youtube to watch how to videos. Any advice would be welcome - I am sure it is not hard - I am just a

Re: TranslateBehavior clarification

2014-08-28 Thread Thomas von Hassel
Hey Sorry to bump this, but is there a verdict from the powers that be ? ;) /thomas On 27 Aug 2014, at 16:53, José Lorenzo jose@gmail.com wrote: What happens if you try to select a few fields? On Wednesday, August 27, 2014 3:05:28 PM UTC+2, Thomas von Hassel wrote: Hey In 2.x

Re: Basic data fetching

2014-08-28 Thread Tristan Plumley
Thanks for the reply. I was actually doing your second example until i decided to build an array manually. The reason was if i just send the entire customer info using find('first') with no recursive, i would get all the data i needed for the form in 1 set(). Is it good practice to send more

Re: Basic data fetching

2014-08-28 Thread Andras Kende
In my opinion: - 1 set() or 2 set() doesn't matter. - Doing a manual foreach to create an array for devices list seems to be going against the framework, if there builtin 1 liner for it .. - also the check your sql_dump debug output of queries, on my example there should be 2 very simple sql