X-Git-Url: https://svn.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/011a53d5681ad1f5fa88a534ec041c93d3e7be95..cd282ee58b2893790d06ce40a8b02c65481abbeb:/skins/getPhotoContextInfos.py diff --git a/skins/getPhotoContextInfos.py b/skins/getPhotoContextInfos.py index f332b2a..b070a83 100755 --- a/skins/getPhotoContextInfos.py +++ b/skins/getPhotoContextInfos.py @@ -3,9 +3,11 @@ from ZTUtils import make_query as mq from Products.CMFCore.utils import getToolByName pptool = getToolByName(context, 'portal_photo_print', None) uidtool = getToolByName(context, 'portal_uidhandler') +utool = getToolByName(context, 'portal_url') +portal = utool.getPortalObject() form = context.REQUEST.form portfolio = context.getParentNode() -bsize = form.get('b_size',20) +bsize = portal.getProperty('default_batch_size', 20) infos = [] index = 0 @@ -35,6 +37,7 @@ for i, p in enumerate(portfolio.listNearestFolderContents(contentFilter={'portal ,'href': purl ,'thumbSize':size ,'title' : p.Title() + ,'displayed' : p == context ,'className': (selected and 'selected' or '') + ((p == context) and ' displayed' or '') , 'index': i }