The scriptBlock solution you provided worked perfectly, thanks very
much!
On Aug 27, 9:43 am, cricket <zijn.digi...@gmail.com> wrote:
> On Thu, Aug 26, 2010 at 11:59 PM, gvphoenix <gverh...@gmail.com> wrote:
> > I'm trying to use cufon font replacement with a cakephp app. I can get
> > the two js files referenced fine in the header with this:
>
> > <?php echo $html->script(array('cufon-
> > yui','Pigiarniq_Heavy_400.font.js')); ?>
>
> The .js extension should be left out: 'Pigiarniq_Heavy_400.font'
>
> > but I'm hung up on the syntax for the last piece for cufon:
>
> > <script type="text/javascript">
> > Cufon.replace('h1');
> > </script>
>
> $html->scriptBlock('Cufon.replace("h1");');
>
> You can pass a 2nd param, array('inline' => false), if you want the
> block to be added to the head. However, you may have trouble with that
> in this case as replace() probably needs to only run after the entire
> page has loaded. So, maybe inline needs to be true.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment