Error when changing GlobalArea to Area

Permalink
I have a header.php include that has this line of code in it:
<?php $a = new GlobalArea('Slider'); $a->setBlockLimit(1); $a->display();?>


The site has been built out and is about ready to launch.

Now the client wants this area to be different on every page, so it needs to be a normal area. So I changed the above code to this:
<?php $a = new Area('Slider'); $a->setBlockLimit(1); $a->display(c);?>

and got this error:
Fatal error: Cannot pass parameter 1 by reference in /home/fatalffadmin/dev/themes/FatalFunnelTheme/inc/header.php on line 35

Any ideas what I need to do to get this working as a normal area?

CygnetMidwest
 
mesuva replied on at Permalink Best Answer Reply
mesuva
Two suggestions:

- When it's a normal Area, you need to go $a->displayed($c); (you are missing the $)
- Changing an area between Global and a normal area without changing the area handle results in some funny behaviour. I'd suggest you change your 'Slider' to something new.
CygnetMidwest replied on at Permalink Reply
CygnetMidwest
Thanks! That did the trick.