I want to give my users a gallery of images on their profile pages. I created a content type for Profile Image and

made a view + block combo that shows up on the user profile pages. Is there a way to use Views to use the arg(1)

userid to grab only images uploaded by that userid?

The end result is that each user profile displays that user's uploaded photos using Views and Blocks. I could do it with php but i'd like to know the Views method if there is one.

Any ideas?

Comments

andybrace’s picture

have a look at the views handbook pages, they explain how to use the arguements manually and give some usefule use cases:

http://drupal.org/node/54455

roleychiu’s picture

Thanks andy. I read through the handbook and Built a View that changes based on the userid supplied.

However, my desired functionality requires this to work in a Block.

I can get the View's nodes to change in a Page view, ( www.example.com/profile-gallery/$uid )

but it won't work for my block view which is showing up on the user profiles pages: ( www.example.com/user/$uid )

Do you know where i'm going wrong?

andybrace’s picture

have you tried specifying your own arguement handling code ?(see http://drupal.org/node/70145) this should then apply to the block as well.