Var present if defined in Template?
I'm trying to have a variable present on all pages that use a particular template. It's not working though.
For instance if I take a session value created at login ($memberID) and want this to be present as "$memberID" and on all pages using the template this does not see possible. Why, I do not know. Yes, I could use the $_SESSION each time but I would prefer to use $memberID or $mid to be more specific.
I've also tried creating a plugin type page (include) that defines the Var but it's still not available when a query is run on a page using the template.
I suspect it's due to loading sequence. Is there a trick to make this work?