]> CRI, Mines Paris - PSL - Portfolio.git/blobdiff - skins/selectioncontext.py
Renommage des variables backToContextUrl et lastBcUrl qui sont automatiquement mis...
[Portfolio.git] / skins / selectioncontext.py
index 36727f67061f09f76945f6f0b2c389c7c3490115..8539a4e784b714ae3264c552ebcc7c8fc081bb60 100644 (file)
@@ -60,7 +60,8 @@ if ajax == True :
     photoPath = list(photo.getPhysicalPath())
     photoPath.insert(portalDepth, 'selectioncontext')
     options['lastBcUrl'] = toUrl(photoPath)
     photoPath = list(photo.getPhysicalPath())
     photoPath.insert(portalDepth, 'selectioncontext')
     options['lastBcUrl'] = toUrl(photoPath)
-    meth = getattr(photo, 'photo_view_ajax_template')
+    app = context.restrictedTraverse('/')
+    meth = app.restrictedTraverse(photo.getPhysicalPath() + ('photo_view_ajax_template',))
     return meth(req, resp, **options)
 
 
     return meth(req, resp, **options)
 
 
@@ -134,5 +135,6 @@ options['breadcrumbs'] = breadcrumbs
 
 ti = photo.getTypeInfo()
 method_id = ti.queryMethodID('view', context=photo)
 
 ti = photo.getTypeInfo()
 method_id = ti.queryMethodID('view', context=photo)
-meth = getattr(photo, method_id)
+app = context.restrictedTraverse('/')
+meth = app.restrictedTraverse(photo.getPhysicalPath() + (method_id,))
 return meth(req, resp, **options)
 return meth(req, resp, **options)