Help and About โ
Location
/etc/projectConfigs/
โโcorpus-1/
โโsearch.xml
โโhelp.inc
โโabout.inc
โโarticle.xsl
โโmeta.xsl
โโstatic/
| โโlocales/
| | โโen-us.json
| | โโ...
| โโ...
โโcorpus-2/
โโcorpus-3/
โโ...
โโdefault/
| โโsearch.xml
| โโ...
โโ...
<--- The location set in the corporaInterfaceDataDir setting
<--- Exact name/ID of the corpus as in BlackLab
ย
ย
ย
ย
ย
ย
<--- Language files for the interface, specific to this corpus
ย
ย
<--- Anything else you want to make available client-side
ย
ย
ย
<--- Fallbacks / Defaults go here
ย
ย
ย
These files are used to provide HTML content for the MyCorpus/about/
and MyCorpus/help/
pages. You can customize these files to include any information you want to display on those pages.
Usually, you would just put some html content in here, these are actually Apache Velocity templates,
so you can use the full power of Velocity to generate dynamic content if you want to.
There are some variables and utils available, for full details see the relevant code.
You can refer to these using the velocity syntax $var
or $util.method()
.
Available variables and utils (full file)
java
// Utils
model.put("esc", esc);
model.put("date", date);
// For use in queryParameters to ensure clients don't cache old css/js when the application has updated.
model.put("cache", GlobalConfig.commitHash);
// title of the current page
model.put("page", this.name);
// Stuff for use in constructing the page
model.put("websiteConfig", cfg);
// Version info
model.put("commitHash", GlobalConfig.commitHash);
model.put("commitTime", GlobalConfig.commitTime);
model.put("commitMessage", GlobalConfig.commitMessage);
model.put("version", GlobalConfig.version);
Optional.ofNullable(globalCfg.get(Keys.BANNER_MESSAGE))
.filter(msg -> !this.isCookieSet("banner-hidden", Integer.toString(msg.hashCode())))
.ifPresent(msg -> {
model.put("bannerMessage", msg);
model.put("bannerMessageCookie",
"banner-hidden="+msg.hashCode()+
"; Max-Age="+24*7*3600+
"; Path="+globalCfg.get(Keys.CF_URL_ON_CLIENT)+"/");
});
model.put("JSPATH", globalCfg.get(Keys.JSPATH));
model.put("FRONTEND_WITH_CREDENTIALS", globalCfg.getBool(Keys.FRONTEND_WITH_CREDENTIALS));
// Clientside js variables (some might be used in vm directly)
model.put("CF_URL_ON_CLIENT", globalCfg.get(Keys.CF_URL_ON_CLIENT));
// The config setting never ends in a slash, but in the past it did,
// Preserve this as clientside js/user scripts might rely on this.
model.put("BLS_URL_ON_CLIENT", globalCfg.get(Keys.BLS_URL_ON_CLIENT) + "/");
// OIDC
model.put("OIDC_AUTHORITY", globalCfg.get(Keys.OIDC_AUTHORITY));
model.put("OIDC_METADATA_URL", globalCfg.get(Keys.OIDC_METADATA_URL));
model.put("OIDC_CLIENT_ID", globalCfg.get(Keys.OIDC_CLIENT_ID));
model.put("displayName", cfg.getDisplayName());
model.put("displayNameIsFallback", cfg.displayNameIsFallback());
model.put("contextPath", globalCfg.get(Keys.CF_URL_ON_CLIENT));
model.put("corpusId", corpus.orElse(""));
model.put("corpusPath", globalCfg.get(Keys.CF_URL_ON_CLIENT) + corpus.map(c -> "/" + c).orElse(""));