ty0716 Posted July 13, 2015 Report Posted July 13, 2015 If i want to create a simple page view. Not need to show the "structure.pdt". How to do this? Another question is: $rs=$this->Record->select()->from("Clients"); Why above code show error:Undefined property: Main::$Record on if i want to get some get request value .for example : http://domain.com/clients/main/activity/month/7 How to get the value of month?
0 Tyson Posted July 13, 2015 Report Posted July 13, 2015 On 7/13/2015 at 8:06 AM, ty0716 said: If i want to create a simple page view. Not need to show the "structure.pdt". How to do this? The controller method should return boolean false. On 7/13/2015 at 8:06 AM, ty0716 said: Another question is: $rs=$this->Record->select()->from("Clients"); Why above code show error:Undefined property: Main::$Record on Record has not been instantiated in Main. The Record object is only available automatically to models that extend AppModel. If you want to run a query from your controller, you should call a model that does it instead. On 7/13/2015 at 8:06 AM, ty0716 said: if i want to get some get request value .for example : http://domain.com/clients/main/activity/month/7 How to get the value of month? Assuming "main" is your controller and "activity" is your method, then $month = $this->get[0]; // month $number = $this->get[1]; // 7
0 ty0716 Posted July 16, 2015 Author Report Posted July 16, 2015 On 7/13/2015 at 3:39 PM, Tyson said: The controller method should return boolean false. Record has not been instantiated in Main. The Record object is only available automatically to models that extend AppModel. If you want to run a query from your controller, you should call a model that does it instead. Assuming "main" is your controller and "activity" is your method, then $month = $this->get[0]; // month $number = $this->get[1]; // 7 why in plugins http://domain.com/client/plugin/support_managerpro/client_tickets/add/1/ var_dump($this->get) and var_dump($this->get[0]) show NULL?
0 Tyson Posted July 17, 2015 Report Posted July 17, 2015 On 7/16/2015 at 1:29 AM, ty0716 said: why in plugins http://domain.com/client/plugin/support_managerpro/client_tickets/add/1/ var_dump($this->get) and var_dump($this->get[0]) show NULL? You would have to show more of your code. I've never looked at the Support Manager PRO plugin, but your example URL suggests that $id = $this->get[0]; // 1
Question
ty0716
If i want to create a simple page view. Not need to show the "structure.pdt". How to do this?
Another question is:
Why above code show error:Undefined property: Main::$Record on
if i want to get some get request value .for example : http://domain.com/clients/main/activity/month/7
How to get the value of month?
3 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now