I can't figure out how to get a mini gallery of images from the attached gallery to show in my blog entry.
I've attach a Gallery to my Blog entry, the gallery has several images as children.

My Relationships are
Blog node-type is Parent of Gallery node-type
Gallery node-type is Parent of Image node-type.

Node Relativity settings:
Under Display options for the Blog Node Type i have
Rendering option for children nodes of type Gallery:
Title
( i have tried the body selection, but it just gives a list of the full nodes with big images, teaser gives no image)
Rendering option for children nodes of type Image:
I have tried, title, teaser, body and the images never show up, but
if i use the image_latest view i get a nice display, BUT the images are not restricted to the gallery attached.
So,
I want to make a view similar to the image_latest one that comes with Views, but it should show image thumbnails belonging to the gallery that is attached.

I'm attaching an image of what image_latest does and what i want . But i can't seem to filter them correctly and i don't understand the arguments options well enough. Everything i do makes the images disappear.

any pointers?

CommentFileSizeAuthor
screenshot.png41.88 KBmessenger

Comments

pkej’s picture

I'm not quite sure what you're trying to do, and if the screenshot is a mockup or what you've already have achieved.

Anyway, here is a step by step for a view I use with either viewfield or with insertview modules. Viewfield lets you add views as a CCK field, set the default to %id and all nodes made will use the id of itself as the argument to the embedded view.

Now to the gallery view:

1. Create a new view admin/build/views/add
2. Give it a "Name" in "Basic information". Skip the rest of that fieldset unless you need something special.
3. Open the "Page" viewset.
4. Thick the "Provide Page View" checkbox
5. Set "URL" to "node/$arg/images"
6. Set "View Type" to "List view" (or Image: Gallery if you prefer)
7. Unthick the "Use Pager" checkbox
8. Set the "Nodes per Page" to a reasonable number (6 i think for what you want).
9. Open the "Fields" viewset.
10. Add Field of type "Image: Display Image"
11. Set options for the Field you just added. Recommend "Handler" = "Image with link" and "Option" = "Thumbnail".
12. Open the "Arguments" fieldset
13. Add Argument of type "Relativity: Parent Node ID". Leave the defaults
14. Open the "Sort Criteria" fieldset
15. Add criteria: "Node: Sticky", thus you can set some galleries/images as always showing up first.
16. Set "Order"="Descending"
17. Add criteria: "Node: Created Time", thus the images which aren't sticky will be sorted by when they were created.
18. Set "Order"="Descending" to show the newest images first.

You can skip 15 and 16 if you just want to show the gallery sorted by creation time. Of course you can select any other Node: criteria to sort by user, by title etc.

That's how I would do it with images and galleries. I'm not quite certain of how you want the node->gallery->image thing to work.

To test the above select a node with children images. Find its nid (node id, the number before the /edit part when editing the node). write the following url http://yoursite.com/node/NID/images to test the view.

With the above code (and using view insert filter) you can create pages like this: http://www.samipath.com/en/package/salmon-fishing

On that page the images are children of the package type.

I'm sure this isn't what you want; but I hope it helps you out with understanding view arguments.

Ah, btw, you should install "tokenize" and "token" modules (you have to do some manual patching of "tokenize" to make it work without error messages). Then, if you use the view field, you will be able to insert tokens like this "[parent-author-uid] Parent node author's user id" into the arguments you pass to your view. Thus you could use the parent-author-uid to filter the images by user, if that's an requirement.

Multiple arguments in the url are added like thus: "node/$arg/gallery/$arg/user/$arg". In the Arguments fieldset the rows in the table will each be given the input from left to right, top to bottom. ie. first row will have the first $arg, the one following "node", and the third row will take the $arg from "user". You don't have to specify anything as this will happen automatically. You just need to decide what kind of filtering the arguments are doing.

I hope this helps!

messenger’s picture

I'm just getting back to this,
i'll let you know how it goes.

thanks for the nice explanation

the image i attached before is of the working image_latest view, and i want the look of that view, but using the children of the album instead.

NOTE:
In your instructions above you spell tick (meaning to check the box) as thick (meaning not thin, perhaps fat). I found it amusing, but it should be spelled "tick" to be taken seriously :)