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/09/09 10:04] – [Customizing] more specific po file name erickson | 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 61: | Line 42: | ||
| * Create a directory where you will store your template customizations, | * Create a directory where you will store your template customizations, | ||
| - | + | | |
| - | | + | # Templates will be loaded from the following paths in reverse order. |
| - | + | PerlAddVar OILSWebTemplatePath "/openils/var/templates" | |
| - | * Add a new ''< | + | PerlAddVar OILSWebTemplatePath "/openils/var/my_own_templates" |
| - | + | </code> | |
| - | < | + | * 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, |
| - | <template_paths> | + | <VirtualHost *:80> |
| - | < | + | |
| - | <path>/ | + | DocumentRoot |
| - | </template_paths> | + | DirectoryIndex index.xml index.html index.xhtml |
| + | Include eg_vhost.conf | ||
| + | <Location /eg> | ||
| + | PerlAddVar OILSWebTemplatePath "/ | ||
| + | | ||
| + | </VirtualHost> | ||
| </ | </ | ||
| - | |||
| * Place your version of all '' | * Place your version of all '' | ||
| Line 81: | Line 66: | ||
| === String Localization === | === String Localization === | ||
| - | * Create a .po file for your locale. | + | * Create a '' |
| - | sudo -u opensrf xgettext.pl --plugin=tt2 --directory=Open-ILS/ | + | sudo -u opensrf xgettext.pl --plugin=tt2 --directory=Open-ILS/ |
| - | * Add your .po file to /openils/conf/oils_web.xml< | + | * Add your .po file to the Apache '' |
| - | | + | |
| - | < | + | |
| - | < | + | PerlAddVar OILSWebLocale " |
| - | < | + | |
| - | </ | + | </ |
| * Edit strings in your new .po file. For example:< | * Edit strings in your new .po file. For example:< | ||
| ... | ... | ||
dev/opac/template-toolkit.1315577066.txt.gz · Last modified: 2022/02/10 13:34 (external edit)