ZPT: defining a universal variable.
Hi all, I have a situation where I have a script that I want to be able to reference from anywhere, with putting in the full path. The problem is, many of the places I need to use this script (it converts a number into a properly formatted currency(english only, right now), are in files that are loaded from other files which are loaded from other files. Here's a tree view of how I might need to use this script -index |_main_body |_content_area |_summary_box |_call to currency script My question is where do I define the variable so that I can use it anywhere? I get errors if I define it anywhere except the page template that is using it. I hope this is clear. Thanks, Alec Munro
On Thu, Jan 16, 2003 at 03:20:02PM -0400, Alec Munro wrote:
My question is where do I define the variable so that I can use it anywhere? I get errors if I define it anywhere except the page template that is using it.
Assuming we mean an actual variable (int, float, etc.), could you make it a property of a high-level folder, or the root folder? It should then be available via the normal acquisition mechanisms. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
Alec Munro wrote at 2003-1-16 15:20 -0400:
I have a situation where I have a script that I want to be able to reference from anywhere, with putting in the full path. The problem is, many of the places I need to use this script (it converts a number into a properly formatted currency(english only, right now), are in files that are loaded from other files which are loaded from other files. Here's a tree view of how I might need to use this script
-index |_main_body |_content_area |_summary_box |_call to currency script
My question is where do I define the variable so that I can use it anywhere? I get errors if I define it anywhere except the page template that is using it.
I hope this is clear. Not completely.
Trying: put your script in the root folder, then it will be accessible from anywhere by acquisition. Dieter
participants (3)
-
Alec Munro -
Dieter Maurer -
Mike Renfro