Jump to content
  • 0

How To Not Use Structure.pdt In An Action?


Question

Posted

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?

3 answers to this question

Recommended Posts

  • 0
Posted

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.

 

 

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.

 

 

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
Posted

 

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?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...