Plone 網站使用 /TaipeiCity/nangang 之類的路徑,來表示行政地區資訊,下列程式碼可以列出清單:
for k,v in context.objectItems():
if v.meta_type == 'ATFolder':
print k, v.Title()
for x,y in v.objectItems():
if y.meta_type == 'ATFolder':
print k+'/'+x, y.Title()
return printed
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.