Source: site.view [edit]
Function name: getConfigVar
Arguments: server,varName
Description:
Page type: webl
Render function:  
Module: demavu

Page source:

var db = Wub_GetDB("demavu");

var coll = Wub_GetCollection(db, "config");

if server == "-" then
   server = "staging"
end;

var queryObj = [. "server"=server, "varName" = varName .];
var res = Wub_QueryDB(coll, Wub_NewDBObject(queryObj), 50000);

var s = "";
if Size(res) > 0 then
   s = res[0].value ? ""
end;
s