I have a method called ImageTag set up in my Page which takes an image object as a parameter, and returns a string.
public function ImageTag($image) {
...
}
However, when I try to use this from my template, it doesn't work:
$ImageTag($MyImage)
I get an error saying "Trying to get property of non-object". My guess is that this is because I'm not actually passing the image object to the method, but rather the rendered image (i.e. a string with an image HTML tag). How do I access the actual image object from the template to pass that as a parameter to the method?