cake-php@googlegroups.com
[Top] [All Lists]

Re: what is $this->Html->meta('icon') and AppHelper not working

Subject: Re: what is $this->Html->meta('icon') and AppHelper not working
From: AD7six
Date: Sat, 16 Apr 2011 08:58:42 -0700 PDT

On Apr 15, 5:42 pm, varai <vaanip...@xxxxxxxxx> wrote:
> Hi,
>
> Can someone tell me what is the use of?
>                  $this->Html->meta('icon');

It magically converts you into an iconic developer.

>
> Referring to the cakephp cookbook, page 274, in order to get rid of
> the many <? ?> and many echo() calls, i added the following code to
> app_helper.php under class AppHelper extends Helper:
>
> function output($str){
>       echo($str);
>
> }
>
> However, the above code doesn't seem to work.

The above code works fine since it just echos what you pass it - but
putting that in app helper is somewhat silly. You seem to be assuming
that only the last call e.g. return $this->Html->link($this->Html-
>image()); would use "output". This pseudo example is how the core
helpers work, doing what you've done (to avoid "echo"? seriously?) is
just wrong.

>
> what is wrong with the code? does anyone know?

You've deliberately broken something which worked. It is suggested you
undo the mistake...

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php

<Prev in Thread] Current Thread [Next in Thread>