Adding the view to the gallery
Now we want to add a viewfield to our image gallery node type to display the thumbnails of the images in this gallery. Go to admin/content/types and click “manage fields” on the image gallery.
Add a field (field_)”gallery_index” with type “View field” and form element “Select List”. Then save the changes. On the next form check “force default”, in section “Default value”, select “gallery - Defaults” for the view to display and enter “[nid]” in the Arguments: field. In section “Global settings” check “gallery” for allowed views, “use a common default value...” and “Enable token replacement”. In the next section select “gallery - Page” for the view to display and enter “[nid]” in the Arguments: field. Then save the field settings.
On the “Display fields” tab select Label: “<Hidden>”, Teaser: “<Hidden>”, Full node: “Page” for the gallery index. And save your changes.
When we now display our first image gallery in full view, we will see the gallery index below the body text. In some cases you must first edit and save the node to see the gallery index :( . This 'edit first and save' is most likely related to caching issues or "force" option of viewfield.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion