开发者

PHP code in Drupal 6

A very standard example of the problem that I am facing is that of a custom content say blog type. Now t开发者_开发技巧here is a view namely "My Blog Posts". In that view i take the argument as User:uid. Now, for the link part i simply write the code below:

global $user; and send $user->uid as the argument to User:Uid. This give me link for "My Blog Posts" or the blog posts of the logged-in user

What I want is a view like "His Blog Posts". So, if i visit the profile of some other user. There should be a tab in his profile "Blog Posts by Me".

So for that i need to have the UID of the user whose profile I am visiting. So, how can I get this parameter from URL of his profile or somevhere else.


A common way would be to get the parameter from the url if your urls are in the format user/UID you can use arg(1) to get the UID.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜