I personalized my Plone personalize_form and join_form...
It was for me the occasion to make my first script!!! getMemberData
#click on portal_memberdata, click on properties
#add a string field called x, prenom, nom
#click Find tab, type join_form, and click find
#add a field called x
# x, chaine nom de la propriété dont on cherche la valeur, chaine
# membre, chaine nom du membre listé
for member in context.portal_membership.listMembers():
if membre == str(getattr(member, 'id')):
if hasattr(member, x): text+=str(getattr(member,x))
return text
I use it in portal_skins/custom/member_search_results so that instead of the Pseudo, I have under the portrait of the member
the name and firstname
<span class="card" tal:define="name result/getUserName;
home python:container.portal_membership.getHomeUrl(name, verifyPermission=1);
fullname python: here.portal_memberdata.getMemberData(name,'nom');
firstname python: here.portal_memberdata.getMemberData(name,'prenom');
portrait python: here.portal_membership.getPersonalPortrait(name);">
it could be used in the navigation box, in the personal Folder ...
Whatever his fullname, Thanks to runyaga for the tip :)
|