Commit 93a51cac authored by Nicolas Dumazet's avatar Nicolas Dumazet

breadcrumbs: use getCompactTranslatedTitle


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32892 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cacafd1d
...@@ -193,24 +193,16 @@ portal = utool.getPortalObject()\n ...@@ -193,24 +193,16 @@ portal = utool.getPortalObject()\n
\n \n
obj = portal\n obj = portal\n
now = []\n now = []\n
module = True\n
for name in relative:\n for name in relative:\n
obj = obj.restrictedTraverse(name)\n obj = obj.restrictedTraverse(name)\n
now.append(name)\n now.append(name)\n
if module:\n title = obj.getCompactTranslatedTitle()\n
try:\n
title = obj.getTranslatedTitleOrId()\n
except AttributeError:\n
title = obj.Title()\n
else:\n
title = obj.Title()\n
if not name == \'talkback\':\n if not name == \'talkback\':\n
result.append( { \'id\' : name\n result.append( { \'id\' : name\n
, \'title\' : title\n , \'title\' : title\n
, \'url\' : \'%s/%s/view%s\' % (portal_url, \'/\'.join(now), param)\n , \'url\' : \'%s/%s/view%s\' % (portal_url, \'/\'.join(now), param)\n
}\n }\n
)\n )\n
module = False\n
\n \n
return result\n return result\n
</string> </value> </string> </value>
...@@ -271,13 +263,9 @@ return result\n ...@@ -271,13 +263,9 @@ return result\n
<string>portal</string> <string>portal</string>
<string>obj</string> <string>obj</string>
<string>now</string> <string>now</string>
<string>True</string>
<string>module</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>name</string> <string>name</string>
<string>title</string> <string>title</string>
<string>AttributeError</string>
<string>False</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
901 902
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment