Didn't want to hijack the 2.x issue for the 3.x patch, but I thought the feature would be nice.
Okay, NG 3.x uses the default imagecache formatters, just how it should be!
Here is an implementation which I think is the right way, using an imagecache formatter for image gallery nodetypes. To use this, you have to set the formatter in the "display fields" options of the image type to "node-gallery-display linked to galleries next". I had to shorten this text, because it destroys the layout otherwise. It works for all imagecache presets, just as the default formatters.
We could also create custom formatters for lightboxes, or any other stuff that would be comfortable to have in a gallery. What do you think?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | ng3-fragment-on-formatter.patch | 1.6 KB | scroogie |
| node-gallery-formatter.patch | 3.86 KB | scroogie |
Comments
Comment #1
igorik commentedit sounds good, does it mean that it will be works like in facebook - when you will click on the image, it will be switched to the next image?
thanks
Igor
Comment #2
justintime commented@scroogie, check your patch - I think you've got a problem there. The first hunk is removing all the 'path' elements from the theme array returned from node_gallery_theme(). Maybe that's why you're having theme confusion - your theme functions aren't being loaded :)
Comment #3
justintime commentedscratch that, I see now that you were just removing duplicate code.
Comment #4
justintime commentedCommitted #3640700 by scroogie: 3.x link image to next node
Comment #5
justintime commentedMarking as fixed.
Comment #6
scroogie commentedNice that it went in. Hope you like it.
Do we have a status for "needs documentation?"
I guess a lot of people won't find this.
Comment #7
justintime commentedGood point - transforming this issue into a documentation task needing work.
Comment #8
igorik commentedHi
I am sorry but I have no idea from this conversation, what I need to do for having this feature
thanks
Igor
Comment #9
justintime commentedHeh, that's why it's a Documentation that needs work :)
Quick version, if you're using the default content types supplied by NG, visit admin/content/node-type/node-gallery-image/display and select 'node-gallery-display linked to next image' under the "Full Node" column for the "Gallery Image" row. Save your changes, and visit a gallery image node page. Click the image, and you should navigate to the next one.
Comment #10
igorik commentedThanks for explanation, it works nice.
However, I found that this style doesn't respect "Use Named Anchors on Image "Previous" and "Next" links" so click on Next link is going right to path#node-inner, but click on the image is without #node-inner in his path.
Comment #11
scroogie commentedOh, than that was a mistake in my patch that slipped by. I'll take a look.
Comment #12
scroogie commentedHere is a fix. But now I'm sad that this needs an extra database hit :(
Comment #13
igorik commentedIt works nice, thanks for quick patch!
Comment #14
justintime commentedCommitted that to dev as well. Also, we use static caching on relationships, so there *isn't* another hit to the DB here (the relationship is also loaded by the navigator IIRC).
Comment #15
scroogie commentedAh, great work!