Thanks to all who replied. With some additional research, I've been able to figure out that a "content object" won't work with {attribute_view_gui} (causes a fatal error) but with {content_view_gui}, it's not working as I'd expect but at least it doesn't produce an error message.
all I get is a label with a link to the current page. Without the <a></a>, I seem to be getting an empty string. I'll worry about the path once I figure out how to get the file name. What am I missing???
The content_view_gui template function is expecting a content object as the content_object parameter. See: http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_functions/visualization/content_view_gui
Though I'm not sure this will achieve what you are trying to do. However...
Bruce's suggested code gives me an error with the following debug output:
Warning: PHP Jul 11 2005 21:32:56
Undefined property: DataTypeCustom in /var/www/html/mia/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 443
Warning: PHP Jul 11 2005 21:32:56
Undefined variable: imageRow in /var/www/html/mia/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 1414
Is it possible that it's not working because the attribute, image.content.original_filename, is for a custom class (a product named my_image)? If so, how do I get it to work? If not, what else could be wrong?
As long as your attribute is a default image attribute, and the attribute is named image, the above code should work.
But you aren't using any content_view_gui or anything, right? Cause accessing the original_filename will return a string (with the original filename), and not an ezobject/ezattribute (which is needed for the _view_gui functions to work).
If I used any _view_gui's, it was while I was trying anything and everything to figure out how to get a link to the original file of an image in my custom product. Did you see the debug output I posted? I went back and tried creating a single-attribute class - just an image - but it still didn't work. Maybe nobody else can reproduce this. I suppose I could try with a fresh install in another directory or another computer, if necessary.