-
☆ A M B ☆
- 24,524 Posts
If this is to have four items in a row, simply float them and give them width and margins so that only four will fit in a row. They'll automatically line up in nice, neat rows.
I know this works:
[[+idx:modulus:is=`1`:then=`Odd`:else=`Even`]]
Here's the code::
<?php
case 'modulus':
case 'mod':
/* Returns the option modulus on input (default: %2, returns 0 or 1) */
if (empty($m_val))
$m_val = 2;
$output = (float)$output % (float)$m_val;
break;
I'm guessing something like this:
[[+idx:modulus=`4`:is=`0`:then=`Divisible by 4`:else=`Not divisible by 4`]]
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html
sottwell - I originally did it purely with css but they were not lining up because a height was not set and I was not going to be adding one. I am sure I was doing it wrong still hahaha
Bob - Your last one worked just great. It didn't at first due to a caching issue, but it does now so thank you.
I'm glad it worked for you. Thanks for reporting back.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html