Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2018-09-01 13:13:15
- stag*
- Member
- From: Germany
- Registered: 2018-06-16
- Posts: 10
Image Gallery – Output next article's Image ID
Hello, I’m currently trying to build a nice and simple lightbox image gallery using plain html/css without scripts. While displaying a single image works fine using something like the following:
Thumbnails:
<a class=”“ href=”#<txp:images><txp:image_info type=‘id’ /></txp:images>”><txp:article_image thumbnail=“1” /></a>
Full View:
<a class=“lightbox” href=”#_” id=”<txp:images><txp:image_info type=‘id’ /></txp:images>”><txp:article_image /></a>
Image IDs are used here just for sake of having unique referrers to trigger visibility of full view pictures.
Now the question is if there’s any possibility to query and output the next/previous article’s image ID in order to build a navigation within the lightbox to cycle through the images? My assumption is that TXP “knows” this in the same way it does for next/previous articles themselves?
Many thanks in advance for any suggestions or ideas.
Offline
Re: Image Gallery – Output next article's Image ID
Hello, in 4.7 you can use <txp:link_to_next/prev />
tags as container:
<txp:link_to_prev>
<!-- article tags -->
</txp:link_to_prev>
Offline
#3 2018-09-01 15:13:29
- stag*
- Member
- From: Germany
- Registered: 2018-06-16
- Posts: 10
Re: Image Gallery – Output next article's Image ID
Cool! Works like a breeze, thank you very much!
B*
Offline