Re: what is $this->Html->meta('icon') and AppHelper not working
On Apr 15, 5:42 pm, varai <vaanip...@gmail.com> 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home