293054
1. More than the "<foreach>", you need to pay close attention to the "<if>", because they decide what parts of the HTML are omitted when generating the pages.
2. The design of the page isn't as straightforward as you think. First you have a general table with narrow columns on the sides: these are de left column, the main column (the widest), and the right column (which should be optional, enclosed in an "<if>" declaration: "<{if $xoops_showrblock == 1}>...<{/if}>").
3. Then you tackle the main column. There you have three possibilities: 1) the main content area, displayed using this variable: "<{$xoops_contents}>"; 2) the half-width columns (center-left and center-right), and 3) the full-width column (center-center).
As long as you take care of opening and closing correctly the "if" declarations as well as the "foreach" declarations, you should have no problem.
Happy Xoopsing!