Index: zpt/common_template.zpt
===================================================================
--- zpt/common_template.zpt	(revision 536)
+++ zpt/common_template.zpt	(revision 543)
@@ -12,6 +12,6 @@
                 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing;
                 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);">
-    <div class="logo" tal:condition="exists:here/template/logo.png">
-      <img tal:attributes="src here/template/logo.png/absolute_url" />
+    <div class="logo" tal:condition="exists:here/template/site_template.pt/macros/logo">
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/logo"/>
     </div>
     <div class="title-block">
Index: zpt/layer_text_gis.zpt
===================================================================
--- zpt/layer_text_gis.zpt	(revision 526)
+++ zpt/layer_text_gis.zpt	(revision 543)
@@ -31,5 +31,6 @@
             pidlist python:','.join([p['id'] for p in places]);">
         <h4>Places</h4>
-        <ul>
+        Show all places
+        <ul class="list">
           <li>
             <a
Index: zpt/viewer_images.zpt
===================================================================
--- zpt/viewer_images.zpt	(revision 540)
+++ zpt/viewer_images.zpt	(revision 543)
@@ -111,8 +111,17 @@
       <div class="errortext">Sorry, access to this document is restricted.</div>
     </div>
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
+    
   </tal:block>
 </body>
 <body tal:condition="not:numPages">
   <div class="errortext">Sorry, document doesn't exist.</div>
+  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+    <!-- footer -->
+    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+  </tal:block>
 </body>
 </html>
Index: zpt/viewer_index.zpt
===================================================================
--- zpt/viewer_index.zpt	(revision 542)
+++ zpt/viewer_index.zpt	(revision 543)
@@ -128,10 +128,9 @@
       </div>
 
-      <div class="options">
+      <div class="options" tal:condition="docpath">
         <h4>Search</h4>
         <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl">
-          <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':None})"
-            tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> <input type="hidden"
-            name="viewLayer" value="search" />
+          <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})"
+            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
           <!-- query text -->
           <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
@@ -150,22 +149,18 @@
       </div>
       <!-- end search options-->
-      <!--BEGIN search
-          <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action python:here.getLink()">
-            <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params"
-              tal:attributes="name param; value python:params[param]" /> <input type="hidden" name="viewLayer" value="search" />
-            <input type="text" name="query" tal:attributes="value query" /> <input type="submit" value="Search full document" /> <a
-              tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a><br /> <input type="radio"
-              name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> Exact <input type="radio"
-              name="queryType" value="fulltextMorph" tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms <input
-              type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> Fulltext index
-            <input type="radio" name="queryType" value="ftIndexMorph" tal:attributes="checked python:queryType=='ftIndexMorph'" />
-            Morphological index
-          </form>
-          END search-->
     </div>
   </div>
+  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+    <!-- footer -->
+    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+  </tal:block>
+  
 </body>
 <body tal:condition="not:numPages">
   <div class="errortext">Sorry, document doesn't exist.</div>
+  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+    <!-- footer -->
+    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+  </tal:block>
 </body>
 </html>
Index: zpt/viewer_text.zpt
===================================================================
--- zpt/viewer_text.zpt	(revision 540)
+++ zpt/viewer_text.zpt	(revision 543)
@@ -15,5 +15,5 @@
 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
 <script type="text/javascript">
-	// <!--
+// <!--
 	$(document).ready(function() {
 		// autosubmit forms
@@ -38,5 +38,5 @@
                 pn pageinfo/pn; 
                 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
-                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
+                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);">
     <!-- header -->
     <div class="page-head">
@@ -55,8 +55,9 @@
           <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
         </div>
-        <div class="content text">
+        <div class="content text" tal:condition="textPage">
           <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle"
             tal:content="structure pageinfo/pageHeaderTitle" />
-          <tal:block tal:replace="structure textPage" />
+          <tal:block tal:condition="textPage" tal:replace="structure textPage"/>
+          <div class="emptyPage" tal:condition="not:textPage">[Empty page]</div>
         </div>
       </div>
@@ -140,9 +141,17 @@
       <div class="errortext">Sorry, access to this document is restricted.</div>
     </div>
-
+    
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
   </tal:block>
 </body>
 <body tal:condition="not:numPages">
   <div class="errortext">Sorry, document doesn't exist.</div>
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
 </body>
 </html>
Index: zpt/viewer_thumbs.zpt
===================================================================
--- zpt/viewer_thumbs.zpt	(revision 540)
+++ zpt/viewer_thumbs.zpt	(revision 543)
@@ -96,8 +96,16 @@
       <div class="errortext">Sorry, access to this document is restricted.</div>
     </div>
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
   </tal:block>
 </body>
 <body tal:condition="not:numPages">
   <div class="errortext">Sorry, document doesn't exist.</div>
+  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+    <!-- footer -->
+    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+  </tal:block>
 </body>
 </html>
Index: zpt/viewer_xml.zpt
===================================================================
--- zpt/viewer_xml.zpt	(revision 540)
+++ zpt/viewer_xml.zpt	(revision 543)
@@ -83,8 +83,16 @@
     </div>
 
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
   </tal:block>
 </body>
 <body tal:condition="not:numPages">
   <div class="errortext">Sorry, document doesn't exist.</div>
+  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+    <!-- footer -->
+    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+  </tal:block>
 </body>
 </html>
