I used the euromark's solution & it works! Thanks all for your help!

On 6 août, 14:04, Chrriss <polet...@wanadoo.fr> wrote:
> I already have the pages_controller.php but when I add 
> "$this->set("values","This is a test!");", and I dispay in the view, I have
>
> an error message: undefined variable 'values'...
>
> On 6 août, 13:07, Anderson Valongueiro
>
> <anderson.valongue...@gmail.com> wrote:
> > hi, chrriss,
>
> > create the controller "pages_controller.php" after to add the display
> > function("function display"). See below:
>
> > [pages_controller.php]
>
> > class PagesController extends AppController {
>
> >    function display() {
> >       $this->set("values","This is a test!");
> >    }
>
> > }
>
> > and in the [pages/home.ctp]
>
> > <h2><? echo $values; ?></h2>
>
> > On 6 ago, 07:32, Chrriss <polet...@wanadoo.fr> wrote:
>
> > > Hi everyone!
>
> > > I want to add some functions to my homepage 'home.ctp' but the
> > > homepage is not considered as dynamic by cakephp as it's located in
> > > the 'pages' directory. How can I add some functions to my homepage? I
> > > need to display some informations from the database like the number of
> > > articles, etc ...
>
> > > Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to