<?php function smarty_block_p_empty($params, $content, &$smarty) { static $flag; if(is_null($content)) { return; } $parent_params=smarty_get_parent_plugin_params($smarty, 'p_iterator'); if(!$flag || $smarty->_paginator[$parent_params['id']]['counter']>0) { $flag=1; return; } $smarty->_paginator[$parent_params['id']]['empty']=$content; return; } ?>