Sample code:
<div id="latest-ads">
<?php osc_query_item("city_name=Mangalore");
if( osc_count_custom_items() == 0) { ?>
<p class="empty"><?php _e('No Latest Items', 'realestate') ; ?></p>
<?php } else { ?>
<?php while ( osc_has_custom_items() ) { ?>
<div class="ui-item ui-item-list">
<div class="frame">
<a href="<?php echo osc_item_url() ; ?>"><?php if( osc_images_enabled_at_items() ) { ?>
<?php if( osc_count_item_resources() ) { ?>
<img src="<?php echo osc_resource_thumbnail_url() ; ?>" title="<?php echo osc_item_title(); ?>" alt="<?php echo osc_item_title(); ?>"/>
<?php } else { ?>
<img src="<?php echo osc_current_web_theme_url('images/no_photo.gif') ; ?>" alt="" title=""/>
<?php } ?>
<?php } else { ?>
<img src="<?php echo osc_current_web_theme_url('images/no_photo.gif') ; ?>" alt="" title=""/>
<?php } ?>
<div class="type"><?php echo osc_item_category(); ?></div>
<?php if( osc_price_enabled_at_items() ) { ?><div class="price"><?php echo osc_item_formated_price() ; ?></div> <?php } ?>
</a>
</div>
<div class="info">
<div>
<h3><a href="<?php echo osc_item_url() ; ?>"><?php if(strlen(osc_item_title()) > 31){ echo substr(osc_item_title(), 0, 28).'...'; } else { echo osc_item_title(); } ?></a></h3>
</div>
<div class="data"><?php item_realestate_attributes(); ?></div>
<div class="author">
<?php echo osc_format_date(osc_item_pub_date()); ?><br />
<?php echo osc_item_city(); ?> (<?php echo osc_item_region();?>)
</div>
</div>
</div>
<?php } ?>
<div class="clear"></div>
<?php View::newInstance()->_erase('items') ;
} ?>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<div class="pagination-box">
<a href="<?php echo osc_search_show_all_url();?>" class="ui-button ui-button-grey"><?php _e("See all offers", 'realestate'); ?> »</a></p>
</div>
<?php } ?>
</div>
<div id="latest-ads">
<?php osc_query_item("city_name=Mangalore");
if( osc_count_custom_items() == 0) { ?>
<p class="empty"><?php _e('No Latest Items', 'realestate') ; ?></p>
<?php } else { ?>
<?php while ( osc_has_custom_items() ) { ?>
<div class="ui-item ui-item-list">
<div class="frame">
<a href="<?php echo osc_item_url() ; ?>"><?php if( osc_images_enabled_at_items() ) { ?>
<?php if( osc_count_item_resources() ) { ?>
<img src="<?php echo osc_resource_thumbnail_url() ; ?>" title="<?php echo osc_item_title(); ?>" alt="<?php echo osc_item_title(); ?>"/>
<?php } else { ?>
<img src="<?php echo osc_current_web_theme_url('images/no_photo.gif') ; ?>" alt="" title=""/>
<?php } ?>
<?php } else { ?>
<img src="<?php echo osc_current_web_theme_url('images/no_photo.gif') ; ?>" alt="" title=""/>
<?php } ?>
<div class="type"><?php echo osc_item_category(); ?></div>
<?php if( osc_price_enabled_at_items() ) { ?><div class="price"><?php echo osc_item_formated_price() ; ?></div> <?php } ?>
</a>
</div>
<div class="info">
<div>
<h3><a href="<?php echo osc_item_url() ; ?>"><?php if(strlen(osc_item_title()) > 31){ echo substr(osc_item_title(), 0, 28).'...'; } else { echo osc_item_title(); } ?></a></h3>
</div>
<div class="data"><?php item_realestate_attributes(); ?></div>
<div class="author">
<?php echo osc_format_date(osc_item_pub_date()); ?><br />
<?php echo osc_item_city(); ?> (<?php echo osc_item_region();?>)
</div>
</div>
</div>
<?php } ?>
<div class="clear"></div>
<?php View::newInstance()->_erase('items') ;
} ?>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<div class="pagination-box">
<a href="<?php echo osc_search_show_all_url();?>" class="ui-button ui-button-grey"><?php _e("See all offers", 'realestate'); ?> »</a></p>
</div>
<?php } ?>
</div>
No comments:
Post a Comment