开发者

How do I get a user's profile path in Drupal?

How do I get a user's profile path in Drupal based on the author of the current node?

<?php print t('Posted on !date by !username', array('!username' => theme('username', $node), '!date' => format_date($node->created,'custom','m.d.y'))); ?>

The above gets me the right url, but开发者_如何学C that's all i want... the url.


$link = drupal_get_path_alias('user/' . $node->uid);

At least I think that's the most direct. I'm sure there's a more correct answer though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜