88d5d6c7cdfde232b79c2556845ff8a1580d5fa6
[Plinn.git] / skins / generic / getCPInfoList.py
1 ##parameters=
2
3 cp = context.getCPInfo()
4 objectInfos = []
5 rt = context.restrictedTraverse
6 if cp is not None :
7 for path in cp[1] :
8 ob = rt(path, None)
9 icon = rt(ob.getIcon())
10 if ob :
11 objectInfos.append({'title' : ob.title_or_id(),
12 'url' : ob.absolute_url(),
13 'icon' : icon.absolute_url(),
14 'height' : icon.height,
15 'width' : icon.width,
16 'type' : ob.getPortalTypeName()
17 }
18 )
19 return objectInfos