Forum:New discontinuity template problems

I recently created discontinuity templates for the SJA and Torchwood so that they could link to the discontinuity pages. I used the code from the Doctor Who ones, and everything is almost fine. The only problem that I'm having with them is that they don't link to the correct pages if they have (TV story) after the title. Some examples are The Gift (TV story), Reset (TV story) and Adam (TV story). If someone with a little better knowledge than me could have a look and either fix it and tell me what it was, or tell me so I can fix it, then that'd be awesome. Thanks. --The Thirteenth Doctor 22:15, August 15, 2010 (UTC)