source: sites/oxford.openguides.org/templates/display_metadata.tt.old @ 1074

Last change on this file since 1074 was 1074, checked in by Dominic Hargreaves, 14 years ago

Add oxford's custom templates

File size: 2.6 KB
Line 
1[% USE CGI %]
2<!-- METADATA STARTS -->
3
4<div id="metadata">
5[% IF phone OR fax OR address OR postcode OR formatted_website_text
6      OR hours_text OR map_link %]
7  <ul id="general_metadata">
8
9    [% IF phone %]
10      <li class="telephone">
11        <label>Telephone (area code 01865 if omitted):</label> [% CGI.escapeHTML(phone) %]
12      </li>
13    [% END %]
14    [% IF fax %]
15      <li class="fax">
16        <label>Fax: (area code 01865 if omitted)</label> [% CGI.escapeHTML(fax) %]
17      </li>
18    [% END %]
19    [% IF address %]
20      <li class="address">
21        <label>Address:</label>
22        [% IF map_link %]
23          [<a href="[% map_link %]">[% CGI.escapeHTML(address) %]</a>]
24        [% ELSIF os_x AND os_y %]
25          [<a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&amp;[% os_y %]&amp;arrow=yes">[% CGI.escapeHTML(address) %]</a>]
26        [% ELSE %]
27          [% CGI.escapeHTML(address) %]
28        [% END %]
29      </li>
30    [% ELSIF map_link %]
31      <li class="map">
32        <label>Map:</label>
33          [<a href="[% map_link %]">[% CGI.escapeHTML(map_link) %]</a>]
34      </li>
35    [% ELSIF os_x AND os_y %]
36      <li class="map">
37          [<a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&amp;[% os_y %]&amp;arrow=yes">http://www.streetmap.co.uk/streetmap.dll?grid2map?[% CGI.escapeHTML(os_x) %]&amp;[% CGI.escapeHTML(os_y) %]&amp;arrow=yes</a>]
38      </li>
39    [% END %]
40    [% IF postcode %]
41      <li class="postcode">
42        <label>Postcode:</label>
43        [% CGI.escapeHTML(postcode) %]
44      </li>
45    [% END %]
46    [% IF formatted_website_text %]
47      <li class="website_link">
48        <label>Website:</label> [% formatted_website_text %]
49      </li>
50    [% END %]
51    [% IF hours_text %]
52      <li class="opening_hours">
53        <label>Opening Hours:</label>
54        [% CGI.escapeHTML(hours_text) %]
55      </li>
56    [% END %]
57  </ul>
58[% END %]
59
60[% IF (categories.size AND categories.size > 0)
61   OR (locales.size AND locales.size > 0) %]
62  <ul id="categories_and_locales">
63    [% IF categories.size AND categories.size > 0 %]
64      <li class="categories_list">
65        <label>Categories:</label>
66        [% FOREACH category = categories %]
67          <a href="[% category.url %]">[% category.name %]</a>
68          [% "/" UNLESS loop.last %]
69        [% END %]
70      </li>
71    [% END %]
72
73    [% IF locales.size AND locales.size > 0 %]
74      <li class="locales_list">
75        <label>Locale:</label>
76        [% FOREACH locale = locales %]
77          <a href="[% locale.url %]">[% locale.name %]</a>
78          [% "/" UNLESS loop.last %]
79        [% END %]
80      </li>
81    [% END %]
82  </ul>
83[% END %]
84</div>
85
86<!-- METADATA ENDS -->
Note: See TracBrowser for help on using the repository browser.