Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Arguments in Page_Controller


2 Posts   1342 Views


30 September 2007 at 9:52pm Community Member, 501 Posts

So I have this function Gravatar() in my pagecontroller. How would I access it in my template? I always seem to get parse errors when using arguments?

function Gravatar($email= "")
      $size = 40;
      $grav_url = "".md5($email)."&size=".$size;
      $img = "<img src='$grav_url' alt='A member picture' />";
      return $img;

I'm probably doing it the wrong way...?


30 September 2007 at 10:22pm Community Member, 501 Posts

Fixed. Placed it in the DataObjectDecorator of Member...

But still want to hear how I would do it the old way...?