According to Jeff Orchard:
> Hello Mr. Detillieux,
> 
> I would post this question to the htdig mailing list, but it's so basic I
> don't want to annoy everybody on the list.

The big advantage to posting to the mailing list is you get the benefit
of the expertise of several people, rather than the one person you
single out via private mail.  While your question may seem basic (as
do many questions on the list), it does require some PHP experience
to answer it effectively.  I have no such experience.  For other
reasons why it's better to keep htdig questions on the mailing list,
see http://www.htdig.org/FAQ.html#q1.16

> I'm wondering if I've interpreted the "allow_in_form" attribute setting
> correctly.
> 
> Is this how I would pass the name of a style sheet that's stored in php as
> $style?
> 
> 1) in the html form:
> 
>       <input type="hidden" name="style" value="<?php echo $style; ?>">
> 
> 2) "allow_in_form" attribute settings:
> 
>       allow_in_form: style
> 
> 3) in the htdig template:
> 
>       <link rel="stylesheet" type="text/css"
> href="http://www.website.com/css/$(STYLE).css">

This looks to me like correct usage of allow_in_form, but I'm not sure
it'll generate correct PHP for you.  The htsearch output for the template
snippet above would be something like...

        <link rel="stylesheet" type="text/css"
href="http://www.website.com/css/<?php echo $style; ?>.css">

Is that what you want?  Either that or I'm misinterpreting what will
happen.  If your search form is in fact PHP and not HTML as you say,
then I expect the <?php echo $style; ?> will expand to the actual value
of the PHP $style variable, before htsearch even sees it, so the actual
value of it would get plugged into htsearch's output in place of the
$(STYLE) reference.

What you don't mention in your e-mail is whether you've actually
tried this already to see whether it would do what you want.  If you
haven't tried it, why not?  I can't see how it would break anything to
try it just as you specified.  If you have tried it, and it failed,
it might be useful to know exactly what htsearch did spit out.
If htsearch seems to be ignoring your allow_in_form setting, see
http://www.htdig.org/FAQ.html#q5.31

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to