Drupal 7 Pager for Node Gallery
In the Node Gallery tutorial we created a teaser view to highlight the galleries images while viewing the node image. That teaser view was not a pager so this tutorial will be implementing a pager for the node gallery.
Using Views Relationships to redirect the link to the Node Gallery and setting it up in Views REWRITE RESULTS.
Now we will change the Album teaser view for the Node Gallery here.
so the Node Gallery thumbnails point to the Node Galleries instead of the Node Gallery images.
Go to the Single Image display in the Album Teaser view. We will redirect the image link to the Node Gallery instead of the image itself.
To do this we need to create a relationship with the node gallery using the node references url widget that you setup in the content type Node Image.
Next add a Content:Nid field and enable the relationship. Enable the "Exclude from display" box so the nid values do not display above the images.
Also you may need to rearrange the field so that it is above the image field.
Edit the image field and make sure the 'link image to' widget is set to 'nothing'. Then go into the rewrite results tab and select "output this field as link". Here we are redirecting the link path to the Node Gallery. We will use the Content:Nid from the replacement patterns as such
And inserting it into the link path as such
Also the "link to image' in Formatter will need to be set to nothing or else it will override the "Rewrite Results" settings.
Now go into the Node Gallery View and change the image field formatter to Colorbox and the gallery grouping to per page instead of per post.
That's it, you should now have the pager enabled for your Node Gallery.
- New post: Posting location co-ordinates to a drupal service - Part 2 http://t.co/MQhlVKBNKC — 2 months 2 days ago
- New post: Posting location co-ordinates to a drupal service - Part 1 http://t.co/2xlYgqFaJ0 — 2 months 3 days ago
- New post: Connecting a drupal service with a mobile application - Part 2 http://t.co/01cFtAunDs — 2 months 3 days ago
- New post: Using drupal services to connect to mobile applications - Part 1 http://t.co/VEURftHCef — 2 months 3 days ago
- New post: Creating Drupal 7 video gallery http://t.co/HvpKU7uT — 4 months 1 week ago