| Re: Column Layout in Smarty |
| by Dylian on 2010/1/28 17:10:22 Try this: le="color: #000000"><?php <table cellpadding="5" cellspacing="5" class="outer"> <tr> <{foreach item=mytest from=$block.mytest}> <td class="even"> <div> <{$mytest.name}> </div> </td> <{/foreach}> </tr> </table> And please stop sending me pm's everytime you've got a problem. If noone reacted to your help request for a week or two then you can send me a pm, but not just a day after you posted you help request... Greets Dylian. |
| Column Layout in Smarty |
| by xsell on 2010/1/27 0:46:08 Hello.. My Quastion Very Simple , How to Make My block Prints out the Records into Column instaed Row .. this is my Block Code. le="color: #000000"><?php include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; function b_news_blocks_show($options) { global $xoopsUser, $xoopsConfig, $xoopsDB; $block = array(); $myts =& MyTextSanitizer::getInstance(); $sql=$xoopsDB->query("select count(id) from ".$xoopsDB->prefix("test").""); list($numrows) = $xoopsDB->fetchRow($sql); $result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("test")." order by id desc limit ".$options[1].""); while($myrow = $xoopsDB->fetchArray($result)){ $mytest= array(); $mytest['name'] = $myts->htmlSpecialChars($myrow['name']); $block['lang_xname'] = _MB_MYNAME; $block['mytest'][] = $mytest; } return $block; } function b_news_blocks_edit($options) { $form = "Noumber of Names "; $form .= "<input type='hidden' name='options[]' value='"; $form .= "date'"; $form .= " />"; $form .= "<input type='text' name='options[]' value='".$options[1]."' /> #"; return $form; } this is my Template which prints the result in Row , I need it to print it out to 2 column . le="color: #000000"><?php <table cellpadding="5" cellspacing="5" class="outer"> <{foreach item=mytest from=$block.mytest}> <tr> <td class="even"> <div> <{$mytest.name}></div> </td> </tr> <tr> <{/foreach}> </tr> </table>
|