..just posting this for anyone else who might need it at some point.. it's a bit of a hack, but works.
when building the section loop from an
API call:
$items = pnModAPIFunc
('MODULE',
'user',
'getall',
array('catid' =>
$catid));
$i =
0;
foreach($items as $item) {if($i%
2 ==
0) { // assign styles left & right $style =
'float:left; width:48%; text-align: justify; border:1px solid #ff0000;';
$i++;
} else { $style =
'float:right; width:48%; text-align: justify; border:1px solid #0000ff;';
$i++;
}$items[] =
array('style' =>
$style,
'title' =>
$item['title']);
// build item array}$pnRender->
assign('items',
$items);
// assign item array to templatereturn $pnRender->
fetch('template.htm');
// return the template
..in this loop just the title and styles are added to the $items array, then assigned to the template. Their borders are colored to detail the example.. left is red, right is blue.
this is the template the variables were assigned to:
<div style="width:90%; border:1px solid #000000; margin: 0 auto; text-align: justify;">
<!--[section name="items" loop=$items]-->
<div style="<!--[$items[items].style|pnvarprepfordisplay]-->">
<span class="item"><!--[$items[items].title|pnvarprepfordisplay]--></span>
</div>
<!--[/section]-->
</div>
..the container is colored as well (#000000).. the loop appears to break it, but the items are still contained. This example produces a left to right, ordered, 2 column layout without tables..
that's all i've got.. if anyone can improve it; please, please do.
-IR