X-Git-Url: https://scm.cri.mines-paristech.fr/git/MosaicDocument.git/blobdiff_plain/1aed5a5073041e18e085d5f03b320efa7e9a0f71..d3ae9b28834e7e43b84fb81b06fb5ace521855e8:/skins/xml_nav_tree.py?ds=inline diff --git a/skins/xml_nav_tree.py b/skins/xml_nav_tree.py index 30013fb..05967d9 100644 --- a/skins/xml_nav_tree.py +++ b/skins/xml_nav_tree.py @@ -1,5 +1,6 @@ ##parameters=filter='' - +from ZTUtils import SimpleTreeMaker +stm = SimpleTreeMaker() def replaceXMLEntities(text) : for c, ent in (('<', '<'), ('>', '>'), ('&', '&')) : text = text.replace(c, ent) @@ -18,8 +19,8 @@ for ob in context.listNearestFolderContents(contentFilter={'portal_type':filter} state = 0 if not getattr(ob, 'isPortalContent', False) : state = ob.listNearestFolderContents(contentFilter={'portal_type':filter}) and "-1" or "0" - row = '%(title)s' % { - 'id' : ob.getId(), + row = '%(title)s' % { + 'name' : stm.node(ob).id, 'url' : ob.absolute_url(), 'title' : ' '+replaceXMLEntities(ob.title_or_id()), 'description' : ob.Description().translate(rmBadAttrChars),