dev:opac:template-toolkit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:opac:template-toolkit [2011/08/18 11:58] – [Development conventions] dbs | dev:opac:template-toolkit [2022/02/10 13:34] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
* Create Date: 2011-03-08 | * Create Date: 2011-03-08 | ||
- | * [[dev: | + | * <del>[[dev: |
+ | * [[dev: | ||
===== The Code ===== | ===== The Code ===== | ||
- | The code currently lives in an ESI Git branch called " | + | On 2011-09-11, the code was merged to the master branch |
- | + | ||
- | Downloading | + | |
- | + | ||
- | < | + | |
- | $ git clone git:// | + | |
- | $ cd equinox | + | |
- | $ git checkout -tb template-toolkit-opac origin/ | + | |
- | </ | + | |
- | + | ||
- | The code changes frequently. | + | |
- | < | + | |
- | $ git checkout template-toolkit-opac # just in case | + | |
- | $ git pull | + | |
- | </ | + | |
===== Installation ===== | ===== Installation ===== | ||
Line 32: | Line 18: | ||
* Locale:: | * Locale:: | ||
- | ==== Installing | + | ==== Installing |
- | - Copy these files from the repository into place on the file system. | + | The TPAC needs to be installed as part of an overall |
- | *< | + | |
- | $ sudo cp Open-ILS/ | + | Pay close attention to the following files on upgrade: |
- | $ sudo -u opensrf cp Open-ILS/ | + | * ''Open-ILS/ |
- | $ sudo cp -r Open-ILS/ | + | * Perl modules, including the previously mentioned prerequisites |
- | $ sudo -u opensrf cp -r Open-ILS/src/templates* / | + | * '' |
- | | + | * '' |
- | - Reload or restart Apache. | + | |
- | | + | Navigate to http:// |
==== Staff Client Integration ==== | ==== Staff Client Integration ==== | ||
* The eventual goal is to fully integrate the TT OPAC into the staff client. | * The eventual goal is to fully integrate the TT OPAC into the staff client. | ||
- | * To use the Template Toolkit OPAC as the catalog in the staff client, | + | * To use the Template Toolkit OPAC as the catalog in the staff client, |
- | echo " | + | |
- | urls[' | + | |
- | urls[' | + | |
- | urls[' | + | |
- | urls[' | + | |
==== Customizing ==== | ==== Customizing ==== | ||
Line 60: | Line 41: | ||
Skinning the TT OPAC is much easier than skinning previous incarnations of the Evergreen OPAC. | Skinning the TT OPAC is much easier than skinning previous incarnations of the Evergreen OPAC. | ||
- | * Create a directory where you will store your template customizations, | + | * Create a directory where you will store your template customizations, |
+ | * Edit your Apache configuration to include the overriding template directory _after_ the main template directory:< | ||
+ | # Templates will be loaded from the following paths in reverse order. | ||
+ | PerlAddVar OILSWebTemplatePath "/ | ||
+ | PerlAddVar OILSWebTemplatePath "/ | ||
+ | </ | ||
+ | * You can, for example, customize skins on the basis of the hostname being used via virtual hosts; note that the base template directory gets loaded first in eg_vhost.conf, | ||
+ | < | ||
+ | ServerName myhostname | ||
+ | DocumentRoot | ||
+ | DirectoryIndex index.xml index.html index.xhtml | ||
+ | Include eg_vhost.conf | ||
+ | < | ||
+ | PerlAddVar OILSWebTemplatePath "/ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | * Place your version of all '' | ||
- | * Look for the node ''< | + | * Do **not** copy every file under ''/ |
- | * Add a new ''< | + | * Reload Apache. |
- | < | + | === String Localization === |
- | <template_paths> | + | |
- | < | + | |
- | <path>/ | + | sudo -u opensrf xgettext.pl --plugin=tt2 --directory=Open-ILS/ |
- | </template_paths> | + | * Add your .po file to the Apache '' |
+ | PerlAddVar OILSWebLocale " | ||
+ | PerlAddVar OILSWebLocale "/ | ||
+ | | ||
+ | PerlAddVar OILSWebLocale "/openils/ | ||
</ | </ | ||
- | + | | |
- | | + | ... |
- | + | #: Open-ILS/src/ | |
- | * Do **not** copy every file under ''/ | + | msgid "My Account" |
- | + | msgstr "Mon compte" | |
- | * Reload Apache. | + | ...</ |
+ | * Reload Apache. | ||
+ | * To test, reload the page with fr-CA as the browser' | ||
=== Custom Perl Handler === | === Custom Perl Handler === |
dev/opac/template-toolkit.1313683093.txt.gz · Last modified: 2022/02/10 13:34 (external edit)