################## ###### USER ###### ################## #affiche le nom et l'avatar d'un utilisateur lib.userName = COA_INT lib.userName { 10 = CONTENT 10 { table = fe_users select { pidInList = {$user} where.current = 1 where.intval = 1 where.wrap = uid = | } renderObj = COA_INT renderObj { stdWrap.typolink { parameter = {$pagePerso} additionalParams = &userid={field:uid} additionalParams.insertData = 1 target=_blank } # firstname 10 = TEXT 10 { field = first_name wrap = | } # lastname 20 = TEXT 20 { field = name noTrimWrap = | || } } } } ### AVATAR ### lib.userAvatar = COA_INT lib.userAvatar { 10 = CONTENT 10 { table = fe_users select { pidInList = {$user} where.current = 1 where.intval = 1 where.wrap = uid = | } # renderObj = COA_INT # renderObj { # 10 = TEXT # 10 { # field = avatar # wrap = # } # } renderObj = COA_INT renderObj { # Silouhète / Avatar ou Photo 10 = COA 10 { wrap = | // S'il y a un avatar mais qu'il n'y a pas d'image 10 = TEXT 10 { field = avatar wrap = Profile Picture if.isTrue.field = avatar if.isFalse.field = image } # S'il y a une image, on affiche l'image 20 = COA_INT 20 { if.isTrue.field = image 10 = TEXT 10 { field = image wrap = } } # Si pas d'image et pas d'avatar on affiche la silhouette en fonction du sexe 30 = COA 30 { # Cas silhouette = Madame 10 = COA 10 { wrap = Profile Picture 10 = IMG_RESOURCE 10.file = EXT:wseils/Resources/Public/Images/Annuaire/profil-Madame.png if.isFalse.field = image if.isPositive = 1 if.isPositive.if { isFalse.field = avatar isInList.field = title value = Mme,Mlle } } # Cas silhouette = Monsieur (champ title M.) 20 = COA 20 { wrap = Profile Picture 10 = IMG_RESOURCE 10.file = EXT:wseils/Resources/Public/Images/Annuaire/profil-Monsieur.png if.isFalse.field = image if.isPositive = 1 if.isPositive.if { isFalse.field = avatar isInList.field = title value = M. } } # Cas silhouette = Monsieur (champ title vide) 30 = COA 30 { wrap = Profile Picture2 10 = IMG_RESOURCE 10.file = EXT:wseils/Resources/Public/Images/Annuaire/profil-Monsieur.png if.isFalse.field = image if.isPositive = 1 if.isPositive.if { isFalse.field = avatar isPositive = 1 isPositive.if { isFalse.field = title } } } } } } } }