Thanks tbworld.
Ideally we would like to do as little modifying as possible to the core files.
I have actually found a way that works better for what I am trying to achieve - and it validates in the template!
Instead of trying to compare the whole parentlist array (690,610,-1) I've created variables in the custom plugin that are assigned to specific keys in the array (each forum id level).
Code:
// Get the second last key in the array and assign it to a variable
$grandparent = $parentarray[count($parentarray)-2];
I do the same to get the third last key.
Now I can access the variable in my template like this
Code:
<vb:if condition="in_array($grandparent, array(13,62))"> It's working </vb:if>
This method seems to be exactly what am after, and the best part is I don't have to force save the templates.
Thanks for all your replies everyone. Talking it out and looking at the possible options has helped me understand better what I can do/need to do.
Thanks,
hilaryl