On Jan 28, 2004, at 12:16 PM, John Divney wrote:

I am not concerned w/  processing foo.adp 2x. I need to do that.
What I am looking for is for foo.adp to know that index.adp or
processing.adp included it, so I can alter the code in foo.adp based
on what page includes it.

You'd be much better off passing an argument to foo.adp from the page that includes it that tells it what to do. This way, it will be easier to maintain down the road when someone includes foo.adp expecting one behavior, only to get another because they weren't the right caller.

Also, if possible, make the parameter you pass something that affects
the output directly, rather than just being a flag that foo.adp checks.
 For example, rather than this:

  if (flag) {
       ns_puts "String1"
} else {
       ns_puts "String2"
}

Make the parameter a string, and pass it in directly.  It's easier to
debug something if its control flow doesn't change directly based on a
parameter.

Aside from that, you're much better off passing this directly as a
parameter of some sort, even if it's a flag, than having foo.adp guess
from where it's being called.


-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to