Jump to content
  • 0

How To Not Use Structure.pdt In An Action?


ty0716

Question

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?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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
Link to comment
Share on other sites

  • 0

 

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?

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...