Two logos on each row?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 6, 2009   (RSS)

Re: [einslistir] Two logos on each row?

By Chris - September 25, 2009 - edited: September 25, 2009

Hi einslistir,

You certainly can! I think the simplest approach would be to use code like this to output your logos in two columns:

<table>
<tr>
<?php foreach ($blogRecords as $record): ?>
<td>
<?php echo $record['name'] ?>
</td>
<?php $maxCols=2; if (@++$count % $maxCols == 0): ?>
</tr><tr>
<?php endif ?>
<?php endforeach ?>
</tr>
</table>


Note that you'll want to replace the code in red with your own details.

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Two logos on each row?

Thank you very much! It works perfectly!

If I want to change the coloumns from 2 to 3 or 4, then I guess, I just have to change to number in this part of the code?

$maxCols=2;

Re: [einslistir] Two logos on each row?

By Chris - October 6, 2009

Hi einslistir,

Great to hear you've got this working. :)

Yes, you can change that number to change the number of columns.
All the best,
Chris