Example Apache Configs for domain based branding user/tsbere/apache_lib_urls
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 12 Mar 2013 13:41:25 +0000 (09:41 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Tue, 12 Mar 2013 13:52:07 +0000 (09:52 -0400)
commitb064fd9763500436bc3b644bf49e2baa08b3dd93
treeab740902c48010056d83f080af53d55b9a9b606e
parentb985f0be980990b19ff738e27ed2abc169b8e6bc
Example Apache Configs for domain based branding

The example in this commit assumes you have configured apache to serve
multiple domains or subdomains, either via multiple vhosts or wildcards.

The latter is easily possible with something like:

ServerAlias *.example.org

In your VirtualHost entries.

The apache configurations refer to four datafiles, though you can add more
fairly easily (MVLC has a Novelist file, for example, to hold Novelist codes
per library subdomain). The example files provided here are:

libcode.txt - This is for domain/subdomain to "code" mapping. The code is
    used as the lookup key on all the other files, as well as for looking
    up the logo file.
libname.txt - This is for the library name, for linking to the library in
    this example, but it could be used without that as well. Note that you
    need to use something like &#32; instead of spaces in the names.
libphysloc.txt - This is for the "physical location" that serves as the
    preferred library when patrons are not logged in. This triggers default
    search scoping and floating of copies to the top of lists in results.
liburl.txt - This is for the URL to the library's website, used for linking
    the logo and creating a link in the topnav links bar.

Note that the libcode lookup specifies a default value. If the domain isn't
found then "DEFAULT" is used as the code for other lookups.

The libcode is used for logo lookups by seeing if a replacement small/large
logo exists in /opac/images/LIBCODE/. This can be easily extended to other
files entirely.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/examples/apache/datafiles/README [new file with mode: 0644]
Open-ILS/examples/apache/datafiles/libcode.txt [new file with mode: 0644]
Open-ILS/examples/apache/datafiles/libname.txt [new file with mode: 0644]
Open-ILS/examples/apache/datafiles/libphysloc.txt [new file with mode: 0644]
Open-ILS/examples/apache/datafiles/liburl.txt [new file with mode: 0644]
Open-ILS/examples/apache/eg_vhost.conf.in
Open-ILS/src/templates/opac/parts/topnav_links.tt2
Open-ILS/src/templates/opac/parts/topnav_logo.tt2