[ic] Button problem

interchange-users@interchange.redhat.com interchange-users@interchange.redhat.com
Fri Sep 14 15:51:01 2001


Quoting Sheamus Nulty (snulty@celticlinks.com):
> Hi Folks,
> 
> I'm having a very strange problem when using the button tag. A catalog I'm
> building for the last few weeks seems to be displaying any button tag now as
> a text box and not an image. If for example I use the following code
> 
> [button
>                   text="Checkout"
>                   src="__THEME__/checkout_button.gif"
>                   hidetext=1
>                   form=basket
>                   getsize=1
>                   ]
>                         mv_todo=return
>                         mv_nextpage=ord/checkout
>                 [/button]
> 
> a text Checkout button is created. Now from what I can remember this problem
> occured when I upgraded from 4.7 to 4.8 .
> 
> However, if I create a new catalog from scratch and use the same code for a
> button then it properly displays the image.
> Both catalogs are running off the same code base so I don't understand why
> one works and the other doesn't.

This should be the clue. The question is -- how does the button tag know
when to display an image and when to display text?

It is simple. It tests to see if the file for the image exists; if it
does, then it uses the image. If it doesn't find the image, it shows the
text version instead of what it things will be a broken image.

The way it knows where it should look is from a concatenation of the
Variable value DOCROOT, the catalog.cfg directive ImageDir, and the
image name itself. It puts those together, stripping off any /~user/
component in front of the ImageDir, and sees if that file exists. If it
does, it shows the image. If it doesn't then it uses the text version.

My guess is that DOCROOT doesn't correspond to where your HTML/image
files are.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman