Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I am using Node Gallery extensively in my production site at www.RestoringForeskin.org. It works very well and I use Views to display most of the gallery/image info. My next task is to theme the default gallery/image pages. Anyone who is not offended by the site content (it is NOT a porn site) is welcome to sign up and see what I've done with Node Gallery.
The profile pages of my site have a block of galleries and a block of images for the displayed member. I built two block views, one showing the profile user's galleries and another showing the profile user's pictures.
I first built a view showing the content I wanted. I used a grid with a pager.
Then I set up arguments. I found a page through Google that described using arguments in Blocks. Blocks require special settings for arguments to work. The technique that I used is below, but it can also be done with php code.
The Argument I used is User: Uid with the following properties set: Action to take if argument is not present: set to Provide default argument Provide default argument options set to User ID from URL and Also look for a node and use the node author is checked
To test your View, enter a user ID in the live preview arguments box and press Preview.
I then inserted the blocks in my theme to display only on the user pages. The block display in the content section below the other profile info.
Comments
Comment #1
kmontyUnfortunately, there is no views support out of the box.
You can do this by creating a view with node.type = gallery and an argument that the author UID = the uid passed to views.
Comment #2
kmontyComment #3
seehawk commentedIs this something that's easier to do in v2.0? Or (ideally) will this be something that will be offered right out of the box as part of the 2.0 build?
Comment #4
foodbo commentedi am interested to know that too..!!
Comment #5
Tally commentedI am using Node Gallery extensively in my production site at www.RestoringForeskin.org. It works very well and I use Views to display most of the gallery/image info. My next task is to theme the default gallery/image pages. Anyone who is not offended by the site content (it is NOT a porn site) is welcome to sign up and see what I've done with Node Gallery.
The profile pages of my site have a block of galleries and a block of images for the displayed member. I built two block views, one showing the profile user's galleries and another showing the profile user's pictures.
I first built a view showing the content I wanted. I used a grid with a pager.
Then I set up arguments. I found a page through Google that described using arguments in Blocks. Blocks require special settings for arguments to work. The technique that I used is below, but it can also be done with php code.
The Argument I used is User: Uid with the following properties set:
Action to take if argument is not present: set to Provide default argument
Provide default argument options set to User ID from URL and Also look for a node and use the node author is checked
To test your View, enter a user ID in the live preview arguments box and press Preview.
I then inserted the blocks in my theme to display only on the user pages. The block display in the content section below the other profile info.
Comment #6
kmontyThanks for the how-to!