One of my favourite sites at the moment is developmentseed.org. I really like what they do with there user profiles. How would you go about recreating it.
- http://developmentseed.org/team seems to be a view of users/nodes
- /team/eric-gundersen is a profile/node
- "Posts by Eric Gundersen" block on the right of 2. seems to be a view. Is an argument being parsed to return content by Eric?
- /blog/2009/oct/21/annou开发者_Go百科ncing-managing-news-pluggable-news-data-aggregator the user name links to the profile/node
- Same link as above seems to be a block (teaser I guess).
Do you think there are using the defaults drupal module or a custom content type? How would you go about trying to implement something like this?
Thanks
Ryan
- This seems to be a view of users with 3 fields: The avatar, the title of the user node (see 2) and the role name.
- They're most likely using Content Profile.
- In Views you can add an argument and specify that when no argument has been supplied (as is always the case for a block) a default value should be used. Among those default values you can select the user id from the current path. By adding a argument for the author of a node and specifying a default argument for it you can limit a node list to just the nodes created by that author.
- I think this is built in functionality - the nice URL is probably an alias for user/123 created through PathAuto.
- The block is probably a variant of 3 - the default argument is to take the id from the currently shown node instead and the teaser comes from the node linked to the user with the module described in 2.
So - to create something like that I would install Content Profile and then create some Views with arguments that has default values and with block displays. Does that help? :)
Of course, you can easily custom and theme the related User Profile page by including a user-profile.tpl.php file in your theme.
精彩评论