If there isn't already a variable (and I'm not sure because I'm not familiar with that page), then you need to create a plugin, which is some php code that gets executed at some point in the vb script. That plugin code would have to do your query to set a variable, then register that variable in the vbcms_page template.
When you create a plugin you need to choose a hook location, which corresponds to a certain point in the vb script. Unfortunately I don't know much about that template so I don't know what hook location you should use. Maybe someone else does, or if I get time later I'll look. (Edit: Some people look at the list of hook locations and guess or fid one by trial and error, but if you know some php then I think the best way is to look at the vb php files and find a call to fetch_hook() that's in a place you can use).
BTW, you can also just edit the vb php files to do what you want, but it's much better to use plugins because you can then upgrade without making the same changes to a new set of files.
|