Offset and Start With Loop?
-
Hi,
I’ve got three columns to fill — left, right, and below. HTML code being linear, I now have the loop pulling 50 results and then using a PHP $i variable to count, dumping 8 entries in the left column, then 8 in the right column, then the rest as headlines in the bottom column below the other two. Pretty straightforward stuff.
However, the client now wants the right column to load the first 1-8 entries, the left column entries 9-15, and the bottom column as before.
I believe I’ve done this in MoveableType using start= and offset= values within a tag. But it was three database calls in this scenario. How can I make the loop do something like this: pull 50 results, then grab results 9-15 for the left column, entries 1-8 for the right column, and the rest for the bottom column? Failing that, is it possible to do three loop calls in the index.php template?
Any ideas would be welcome, thank you!
The topic ‘Offset and Start With Loop?’ is closed to new replies.