PHP code in Drupal 6
Posted
by abhishekgupta92
on Stack Overflow
See other posts from Stack Overflow
or by abhishekgupta92
Published on 2010-06-18T06:39:14Z
Indexed on
2010/06/18
6:43 UTC
Read the original article
Hit count: 263
A very standard example of the problem that I am facing is that of a custom content say blog type. Now there 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.
© Stack Overflow or respective owner