Thread:Project:Support desk/How do I find text rendered using templates in MediaWiki?/reply

Inside your #if block, add. All pages that use foo2 will then end up in that category, though not immediately, because the job queue takes time. If you want to accelerate the process, see Manual:RunJobs.php.