Sunday, June 28, 2009

query inside a static page

Hi everyone! I have the next problem:

I wonder if is possible to put a query result on a static page.

I have created a view (views/modelos/some.ctp) who calls some()
function who is included inside the controller models_controller.php,
that i can see it perfectly in::

http://www.example.com/models/some

since here everthing is fine, but if I want to integrate or include an
static page through the render() function:


http://www.ejemplo.com/pages/page1.ctp:
<?php echo $this->render('/models/some',"");?>


the following error appears:

Notice (8): Undefined variable: modelos [APP\views\modelos
\algunas.ctp, line 1]
Warning (2): Invalid argument supplied for foreach() [APP\views\modelos
\algunas.ctp, line 1]

any help?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: