Leaderboard


Popular Content

Showing content with the highest reputation on 11/29/14 in Сообщения

  1. 1 point
    В шаблоне Realia код для свежих добавленных в footer.tpl <div class="content"> {foreach from=$new_grid_items item=new_grid_item} <div class="property"> <div class="image"> <a href="{$new_grid_item.href}"></a> {if $new_grid_item.img != '' } <img src="{$estate_folder}/img/data/{$new_grid_item.img[0].preview}" class="previewi"> {else} <img src="{$estate_folder}/template/frontend/realia/img/no_foto_100x74.png" class="previewi"> {/if} </div><!-- /.image --> <div class="wrapper"> <div class="title"> <h3> <a href="{$new_grid_item.href}"> {if $new_grid_item.city ne ''} {$new_grid_item.city}{if $new_grid_item.street ne ''}, {$new_grid_item.street}{if $new_grid_item.number ne ''}, {$new_grid_item.number}{/if}{/if} {else} {if $new_grid_item.street ne ''} {$new_grid_item.street}{if $new_grid_item.number ne ''}, {$new_grid_item.number}{/if} {/if} {/if} </a> </h3> </div><!-- /.title --> <div class="location">{$new_grid_item.path}</div><!-- /.location --> {if $new_grid_item.price_discount > 0} <div class="price"> {$new_grid_item.price_discount|number_format:0:",":" "} {if $new_grid_item.currency_name != ''}{$new_grid_item.currency_name}{/if} <div class="price_discount_footer">{$new_grid_item.price|number_format:0:",":" "} {if $new_grid_item.currency_name != ''}{$new_grid_item.currency_name}{/if}</div><!-- /.price --> </div> {else} <div class="price">{$new_grid_item.price|number_format:0:",":" "} {if $new_grid_item.currency_name != ''}{$new_grid_item.currency_name}{/if}</div> {/if} </div><!-- /.wrapper --> </div><!-- /.property --> {/foreach} </div><!-- /.content -->Сами объявления берутся в файле /template/frontend/realia/main/main.php private function getNewest(){ require_once SITEBILL_DOCUMENT_ROOT.'/apps/system/lib/frontend/grid/grid_constructor.php'; $grid_constructor = new Grid_Constructor(); $params['order'] = 'date_added'; $params['asc'] = 'desc'; $params['page_limit']=3; $params['page']=1; $res = $grid_constructor->get_sitebill_adv_ext( $params, false, false ); //echo count($res); //print_r($res); $this->template->assign('new_grid_items', $res); }Тут можете поправить $params['page_limit']=3;А вот дополнительные поля в категориях пока никак не добавить, только если переписывать системные файлы.