have you tried setting the variable globally?
add it to functions standard_error() or standard_redirect() and see if that works
FYI
A better solution would be to add the sidebar code to your header or navbar templates ... 1 less template to call per page
---
oops, sorry I didn't notice that this was a 3.5 forum -- I don't know if the above would relate since I haven't even installed vb 3.5