Any ideas guys? Any PHP wizards out there who have bespoked the Gallery Addon to do this?
-
☆ A M B ☆
- 24,524 Posts
You might be able to do something with the :last-child pseudo-class in your CSS.
http://www.quirksmode.org/css/firstchild.html
discuss.answer
Thanks Susan, in the end I worked out a hard-coded fix.. not sure CSS last-selector would work as the Gallery Addon call is placing the data into the HEAD of the page... also would then not work in IE7/8 as they don't support that selector...
Hi, you can make a custom snippet for adding class last every nth time.
<?php
//snippet name switch_last
//output class last every third time
$idx = $x + 1 ; //set start idx to 1
if ($idx % 3 == 0) {
echo 'last';
}
And then you can use it in your galItemThumb tpl.
For example:
<div class="portfolio one_third [[!switch_last? &x=`[[+idx]]`]]">
[ed. note: tomek last edited this post 13 years, 8 months ago.]
If we can really understand the problem, the answer will come out of it, because the answer is not separate from the problem.
J Krishnamurti