Thanks Russ - so finding the current thread ID at the end would be:
{$__globals.threadID|raw}
Yes?
I'm looking to pass thread ID to Google Ad Manager, not check if the thread ID is in an array.
But in any case we have come up with a solution that gives access to parent forum ID, forum ID, thread ID, and thread page number in every template. This lets us block ad tags on any template. If a particular ID doesn't exist in a template, the variable is set to 0.
It took hours to develop.
I have no idea why the software wouldn't do this out of the box, but we've corrected it at our own cost.