verifying an image exists

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

verifying an image exists

Fred Forester-2

Hi All,

I have the need to know if a product image really exists. if a user
mistypes the image location the productsummary.ftl shows the img alt
"Small Image" and I need to show a default image when the specified
image doesn't really exist. how would I go about getting the full path
to the images dir?

Thanx
Fred

Reply | Threaded
Open this post in threaded view
|

Re: verifying an image exists

cjhowe
If you're using freemarker:

<@ofbizUrl>/images/</@ofbizUrl>

If you have your content url setup for your website
pointed at ofbizhome/images then it's
<@ofbizContentUrl></@ofbizContentUrl>
--- Fred Forester <[hidden email]> wrote:

>
> Hi All,
>
> I have the need to know if a product image really
> exists. if a user
> mistypes the image location the productsummary.ftl
> shows the img alt
> "Small Image" and I need to show a default image
> when the specified
> image doesn't really exist. how would I go about
> getting the full path
> to the images dir?
>
> Thanx
> Fred
>
>