Theming User Profiles
Dans cette vidéo, Bob nous montre une astuce de "theming" : comment personnaliser la page de profil des utilisateurs (core module Profile) => récupération du template user-profile.tpl.php dans le module Profile + affichage des éléments de la variable $account => essayez le print_r($account) !!
Attention ! Cet article/vidéo est en Anglais.
On this week's Mustardseed Media Video Podcast, Bob gives you the basics on how to theme user profiles using Drupal's core Profile Module. He talks about print_r, the $account variable, and puzzles over why the user-profile.tpl.php doesn't mention a crucial element. All this week!
- Auteur :
- Modules :
- Mots-clés :
- 6822 lectures

Commentaires :
warning about $account scope
I don't know if you've note that the account array is specific to the LOGGED USER. if you use that array for viewing users profiles, the logged person will allways see its profile and not the person he wanted.
administrator is logged and wants to see someone's profile using the template with $account values will see its own informations. am i wrong?
so that's why i think they didn't put this variable in the available ones due to its potential conflict.
sorry for my english, but hope it could help, i've been trapped
administrator is logged and
administrator is logged and wants to see someone's profile using the template with $account values will see its own informations. am i wrong?
=> this is a good question, I have doubts about ... have to be tested (no time to do it now).
Ne fonctionne pas avec Drupal 7.0-alpha3
Quelqu'un pourrait-il me dire comment faire une chose similaire avec Drupal 7.0-alpha3 ?
J'ai essayé la méthode décrite dans la vidéo mais print_r($account) ne fonctionne apparemment plus sur la nouvelle mouture.
Et moi je suis bien bloqué dans mon avancement... :-(
Merci d'avance biboo si tu m'entends ou les autres...
Pour Drupal 7 / for Drupal 7
<?php print_r($elements['#account']); ?>Poster un nouveau commentaire