パーソナルツール
現在の場所: ホーム plone SNS風味 プロフィール getDispname のソース
書いた本
Plone 完全活用ガイド の Chapter 1, 2, 3, 11 を執筆しました。
plone のインストール、使い方から、機能・デザインのカスタマイズ、プロダクトの作り方まで、 plone のすべてがぎゅっと詰まっている書籍になっていると思います。
plone に興味がある人から、すでに使いこなしている方まで、ぜひ読んでみてください。
Plone 完全活用ガイドのサポートページ
ナビゲーション

 
文書操作

getDispname のソース

作成者 takanori 最終変更日時 2008年06月04日 12時38分

指定されたメンバーのニックネームとフルネームを取得して、表示する名前として返す Python Script のソースコードです。

Click here to get the file

サイズ 1 kB - File type text/python-source

ファイルのコンテンツ

## Script (Python) "getDispname"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=id=0, member=None
##title=
##
if not member:
  mtool = context.portal_membership
  member = mtool.getMemberById(id)
dispname = member.id
if member:
    fullname = member.getProperty('fullname')
    if len(fullname):
        dispname = fullname
    nickname = member.getProperty('nickname')
    if len(nickname):
        dispname = nickname
return dispname

Powered by vine linux, python, zope, plone, coreblog