cloc
Member
Как да извикам последните публикувани обяви на главната страница.
Това е файла който е за топ обявите...искам неговият стил да използвам, но не зная какво да променя да извиква последните обяви...
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
{foreach from=$listings item=listing name=listings_block}
<td valign="top" style="border-left:1px solid #01609B;border-right:1px solid #01609B;border-bottom:1px solid #01609B;">
<table border="0" class="tableFeatured" cellpadding="0"width="100%" cellspacing="0">
<tr>
<td rowspan="3" style="padding:0px; margin:0px;" width="115" align="center" >
<div style="border:1px solid #d2d2d2; width:102px; padding-top:2px;">
<a href="{$GLOBALS.site_url}/listing_details/{$listing.id}/{$listing.Address|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.City|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.State|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}.html">
{if $listing.pictures.0}<img src="{$listing.pictures.0.thumbnail_url}" border="0" />
{else}
<img src="{image}def_realty.jpg" border="0" alt="" />
{/if}
</a>
</div>
</td>
</tr>
<tr>
<td valign="top" style="padding-top:5px;" >
<a href="{$GLOBALS.site_url}/listing_details/{$listing.id}/{$listing.Address|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.City|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.State|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}.html">
[[$listing.Address]]<br/>
[[$listing.City]]
[[$listing.State]]
</a>
</td>
</tr>
{if $listing.Price}
<tr>
<td valign="top">[[FormFieldCaptions!Price]]: <b>{$GLOBALS.custom_settings.listing_currency} [[$listing.Price]]</b></td>
</tr>
{else}
<tr>
<td valign="top">[[FormFieldCaptions!Rent]]: <b>{$GLOBALS.custom_settings.listing_currency} [[$listing.Rent]]</b></td>
</tr>
{/if}
</table>
</td>
{if $smarty.foreach.listings_block.iteration is div by $number_of_cols}
</tr>
<tr>
{/if}
{/foreach}
</tr>
</table>
Това е файла който е за топ обявите...искам неговият стил да използвам, но не зная какво да променя да извиква последните обяви...
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
{foreach from=$listings item=listing name=listings_block}
<td valign="top" style="border-left:1px solid #01609B;border-right:1px solid #01609B;border-bottom:1px solid #01609B;">
<table border="0" class="tableFeatured" cellpadding="0"width="100%" cellspacing="0">
<tr>
<td rowspan="3" style="padding:0px; margin:0px;" width="115" align="center" >
<div style="border:1px solid #d2d2d2; width:102px; padding-top:2px;">
<a href="{$GLOBALS.site_url}/listing_details/{$listing.id}/{$listing.Address|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.City|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.State|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}.html">
{if $listing.pictures.0}<img src="{$listing.pictures.0.thumbnail_url}" border="0" />
{else}
<img src="{image}def_realty.jpg" border="0" alt="" />
{/if}
</a>
</div>
</td>
</tr>
<tr>
<td valign="top" style="padding-top:5px;" >
<a href="{$GLOBALS.site_url}/listing_details/{$listing.id}/{$listing.Address|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.City|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}_{$listing.State|regex_replace:"/[\\/\\\:*?\"<>|%#$\s]/":"_"}.html">
[[$listing.Address]]<br/>
[[$listing.City]]
[[$listing.State]]
</a>
</td>
</tr>
{if $listing.Price}
<tr>
<td valign="top">[[FormFieldCaptions!Price]]: <b>{$GLOBALS.custom_settings.listing_currency} [[$listing.Price]]</b></td>
</tr>
{else}
<tr>
<td valign="top">[[FormFieldCaptions!Rent]]: <b>{$GLOBALS.custom_settings.listing_currency} [[$listing.Rent]]</b></td>
</tr>
{/if}
</table>
</td>
{if $smarty.foreach.listings_block.iteration is div by $number_of_cols}
</tr>
<tr>
{/if}
{/foreach}
</tr>
</table>