Index: documentViewer.py
===================================================================
--- documentViewer.py	(revision 561)
+++ documentViewer.py	(revision 562)
@@ -559,8 +559,8 @@
             docUrl = getParentPath(url)
             metaDom = self.metadataService.getDomFromPathOrUrl(docUrl)
+            docinfo['imagePath'] = url.replace('/mpiwg/online/', '', 1)
 
         elif mode=="filepath":
             # url points to image file, index.meta optional
-            docinfo['imagePath'] = url
             docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + url
             docinfo['numPages'] = 1
@@ -636,6 +636,7 @@
             # number of images from digilib
             if docinfo.get('imagePath', None):
-                docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath']
-                docinfo = self.getDocinfoFromDigilib(docinfo, docinfo['imagePath'])
+                imgpath = docinfo['imagePath'].replace('/mpiwg/online/', '', 1)
+                docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + imgpath
+                docinfo = self.getDocinfoFromDigilib(docinfo, imgpath)
             else:
                 # imagePath still missing? try "./pageimg"
@@ -696,5 +697,4 @@
         docPath = getMDText(docinfo.get('documentPath', None))
         if imageDir and docPath:
-            #print "image: ", imageDir, " archivepath: ", archivePath
             imageDir = os.path.join(docPath, imageDir)
             imageDir = imageDir.replace('/mpiwg/online', '', 1)
Index: zpt/toc_thumbs.zpt
===================================================================
--- zpt/toc_thumbs.zpt	(revision 540)
+++ zpt/toc_thumbs.zpt	(revision 562)
@@ -27,5 +27,5 @@
             <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a
               tal:define="idx thumb/idx" tal:condition="idx" tal:attributes="href python:here.getLink('pn',idx)"> <img
-                tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'images/pic');
+                tal:attributes="src python:test(docinfo.get('imageURL',None),here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'images/pic');
                                 alt idx" /><br />
                 <span tal:attributes="title string:Scan number $idx" tal:content="idx" /> <span
Index: zpt/viewer_index.zpt
===================================================================
--- zpt/viewer_index.zpt	(revision 560)
+++ zpt/viewer_index.zpt	(revision 562)
@@ -46,6 +46,6 @@
       <a tal:define="tp docinfo/titlePage | string:1"
         tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0"
-        tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img
-        tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a>
+        tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img
+        tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" src="template/book.png" /></a>
     </div>
 
@@ -119,9 +119,10 @@
                   History of Science</a> (unless stated otherwise)</td>
             </tr>
-            <tr>
+            <tr tal:define="accType python:docinfo.get('accessType', None)">
               <td class="type">License:</td>
-              <td tal:condition="python:docinfo.get('accessType', None) == 'free'" class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a>
+              <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a>
                 (unless stated otherwise)</td>
-              <td tal:condition="python:docinfo.get('accessType', None) != 'free'" class="content">Internal use only, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a>
+              <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" tal:content="string: ($accType)"/>, 
+                please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a>
                 (unless stated otherwise)</td>
             </tr>
