15,188
edits
Line 56: | Line 56: | ||
=== Variable Usage === | === Variable Usage === | ||
Um does your comment about variables on your ToDo list (i.e. "variables are global to the pages they exist, not exclusively to the templates defining them" now apply here? [[User:Kolano|Kolano]] ([[User talk:Kolano|talk]]) 15:37, 17 November 2015 (CET) | Um does your comment about variables on your ToDo list (i.e. "variables are global to the pages they exist, not exclusively to the templates defining them" now apply here? [[User:Kolano|Kolano]] ([[User talk:Kolano|talk]]) 15:37, 17 November 2015 (CET) | ||
: Well, yes and no. I'm already using a somewhat unique name here (tl_testing_entry_os) so it's not a problem here. The entry in my to do is to use something unique everywhere else on the wiki too, so, the chances of defining a variable with the same name in other page is almost zero (I set that as critical because defining a variable named i in Video Gallery is potentially dangerous if we include another template that also uses i variable on the same page, in worst case we would have a race condition and both templates would be buggy when included together). But yes, that means that another template can "read" the regexp result that is stored in tl_testing_entry_os if such template and {{tl|Testing/entry}} are included together. - [[User:Jhonn|Jhonn]] ([[User talk:Jhonn|talk]]) |