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

Show The Image Filename & Path Only NOT <img src="


Reply


2 Posts   2185 Views

Avatar
brandstudio

Community Member, 5 Posts

3 May 2008 at 2:30am

Edited: 03/05/2008 2:31am

Hi there.

Problem: I add an image field to the backend and currently displaying
the image using..

$Photo2.SetWidth(180)

This prints out <img src="uploads/blahblah.jpg"> and shows the image fine
however.. I only want to echo the filename and location example: uploads/blahblah.jpg

I intend to then load this image into flash. How could I get it to simply echo the filename?
I realise I need to somehow grab it from the file table and refence the Photo2 field but not sure how to execute this within the structure.

thanks in advance : )

Sefton

Avatar
Willr

Forum Moderator, 5513 Posts

3 May 2008 at 6:35pm

You can call the URL method on the Image. Try $Photo2.SetWidth(180).URL Not sure if you can chain it like that, you probably can't :(. Maybe then try <% control Photo2.SetWidth(180) %>$URL<% end_control %>