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.

Archive /

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

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

Arguments in Page_Controller


Reply


2 Posts   1363 Views

Avatar
dio5

Community Member, 501 Posts

30 September 2007 at 9:52pm

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 = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email)."&size=".$size;
      $img = "<img src='$grav_url' alt='A member picture' />";
      return $img;
   }

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

Avatar
dio5

Community Member, 501 Posts

30 September 2007 at 10:22pm

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

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