Variables in external files

This section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Post Reply
barrymol
 
 
Posts: 128
Joined: Thu Feb 09, 2012 11:04 am

Variables in external files

Post by barrymol » Tue Apr 23, 2013 1:25 pm

Can I use extension builder variables in external javascript files?

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Variables in external files

Post by Pablo » Tue Apr 23, 2013 1:55 pm

Yes

barrymol
 
 
Posts: 128
Joined: Thu Feb 09, 2012 11:04 am

Re: Variables in external files

Post by barrymol » Tue Apr 23, 2013 2:20 pm

Short question with an even shorter answer :D

barrymol
 
 
Posts: 128
Joined: Thu Feb 09, 2012 11:04 am

Re: Variables in external files

Post by barrymol » Tue Apr 23, 2013 3:01 pm

For this to work, I assume that at build time, WB will create the actual file in the directory
I specify replacing the variable name with the value.

If I want to use the extension on more than one page and the value for the parameter
needs to be different, I would need to have WB create another instance of the file
in another directory. Right?

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Variables in external files

Post by Pablo » Tue Apr 23, 2013 3:08 pm

Please check out the documentation for more details (page 12).

barrymol
 
 
Posts: 128
Joined: Thu Feb 09, 2012 11:04 am

Re: Variables in external files

Post by barrymol » Tue Apr 23, 2013 3:17 pm

OK. I see the parameter to set so that the file will be processed.
Can I assume that even though I have only one instance of the
javascript file that I have placed in a specific directory, that file
will be modified each time a different page is loaded into the
browser?

In other words, is the resultant file dynamically created specific
to the current pages requirements?

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Variables in external files

Post by Pablo » Tue Apr 23, 2013 3:55 pm

Yes, unless you make the name of the file variable, so each page can use a different instance of the file.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest