So, I've got a custom photo gallery set up. The following is the code.
This displays a two x infinitely long, scrolling, js-based image gallery. See the old, non-Couch version here: http://trezurehunt.in/
With the above code, I more or less manage to re-do gallery, but there are a couple of obvious errors. See http://trezurehunt.in/test/ to see what I mean.
Now, I know that I'm calling the same functions twice, in both 'a' elements, but that's what my existing hard coded gallery was, multiple 'li' columns of 2 'a' elements each.
Basically, I'm thinking of the masterpage codes as 'for' loops in their most basic essence. So I'm wondering if there's a way to store a counter, display 2 elements, update the counter, recursively call the next set. Unto infinity.
Also, it's taken me barely an hour to get to wherever I've gotten, so I'm happy enough to be completely open to any other ways of doing this too.
Cheers.
- Code: Select all
<div class="gallery1">
<ul>
<cms:pages masterpage='gallery/page_gallery.php'>
<li>
<a href="<cms:show k_page_link />">
<span><cms:show k_page_title /><br></span>
<img src="<cms:show gallery_image />" alt="" width="230" height="230">
</a>
<a href="#!/<cms:show k_page_link />">
<span><cms:show k_page_title /><br></span>
<img src="<cms:show gallery_image />" alt="" width="230" height="230">
</a>
</li>
</cms:pages>
</ul>
</div>
This displays a two x infinitely long, scrolling, js-based image gallery. See the old, non-Couch version here: http://trezurehunt.in/
With the above code, I more or less manage to re-do gallery, but there are a couple of obvious errors. See http://trezurehunt.in/test/ to see what I mean.
Now, I know that I'm calling the same functions twice, in both 'a' elements, but that's what my existing hard coded gallery was, multiple 'li' columns of 2 'a' elements each.
Basically, I'm thinking of the masterpage codes as 'for' loops in their most basic essence. So I'm wondering if there's a way to store a counter, display 2 elements, update the counter, recursively call the next set. Unto infinity.
Also, it's taken me barely an hour to get to wherever I've gotten, so I'm happy enough to be completely open to any other ways of doing this too.
Cheers.