{literal}
<style type="text/css">
    div.c-block {
        margin-right: 10px;
        margin-bottom: 15px;
    }
    .t-title {
        margin-right: 10px;
        background: url(/modules/mod_newsblock/ar.png) center left no-repeat;
        padding-left: 7px;
        display: inline-block;
        float: left;
    }
    .t-title a {
        font-size: 17px;
        color: #333;
        padding-left: 10px;
        text-decoration: none;
    }
    span.all {
        float: right;
    }
    span.all a {
        font-size: 10px;
        text-decoration: none;
    }
    .item_block, .ttitle {
        margin-right: 5px;
    }
    div.t-date {
        font-size: 12px;
        color: #9fb2bd;
    }
    div.t_new {
        background: #ad0707;
        color: #fff;
        text-transform: uppercase;
        font-size: 8px;
        display: inline-block;
        padding: 0px 10px;
        border-radius: 3px;
    }
    div.t_border {
        border-left:1px solid #ccc;
        padding-left: 10px;
    }
    a.t_lnk{
        color: #4d4d4d;
        font-size: 12px;
        text-decoration: none
    }
    a.t_lnk:hover {
        text-decoration: underline
    }
    div.comm {
        background: url(/modules/mod_newsblock/comm.png) top left no-repeat;
        width: 33px;
        height: 19px;
        color: #fff;
        line-height: 19px;
        text-align: center;
        padding-left: 10px;
    }
    table.t_list td {
        border-bottom: 1px solid #ccc;
        padding: 5px 2px;
    }
</style>
{/literal}
 <table width="100%" border="0"> 
           {assign var="q" value="1"} 
    {foreach key=id item=category from=$categories}
     {if $q==1} <tr> {/if}   <td>
        <div class="c-block">
            <div class="ttitle">
                <div class="t-title"><a href="/{$category.seolink}">{$category.title}</a></div>
                <span class="all"><a href="/{$category.seolink}">Все записи</a></span>
                <div style="clear: both "></div>
            </div>
            <div class="item_block">
      
                <table class="t_list" width="100%">
                {foreach key=id item=item from=$items}
                {if $item.category_id == $category.id }
                    
                        <tr>
                            <td>
             {if $item.pubdate==1}  <div class="t_new">  
                                    Новое
                                </div>
                                   {else}
                        <div class="t-date">
                                {$item.pubdate}
                            </div>             
                           {/if}        
                                   
                            </td>
                            <td>
                                <div class="t_border">
                                    <a href="/{$item.seolink}.html" class="t_lnk">
                                    {$item.title}
                                    </a>
                                </div>
                            </td>
                            <td width="45">
                                <div class="comm">
                                    {$item.comment}
                                </div>
                            </td>
                        </tr>
                    
                   {/if}
                {/foreach}
                </table>
            </div>
        </div>
   </td>   {if $q==$maxcool} </tr> {assign var="q" value="1"} {else} {math equation="x + 1" x=$q assign="q"} {/if}
    {/foreach}
    
  </table>   
<div style="clear: both;"></div>
