Login   Register  
PHP Classes
elePHPant
Icontem

File: plugins/block.p_item.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Anderson A. Meggiolaro  >  Paginator Iterator  >  plugins/block.p_item.php  >  Download  
File: plugins/block.p_item.php
Role: Auxiliary script
Content type: text/plain
Description: Item Template - the loop
Class: Paginator Iterator
Iterate over listings split in page using Smarty
Author: By
Last change:
Date: 2008-08-07 07:25
Size: 462 bytes
 

Contents

Class file image Download
<?php

function smarty_block_p_item($params$content, &$smarty)
{
    static 
$flag;

    if(
is_null($content)) {
        return;
    }
    
    
$parent_params=smarty_get_parent_plugin_params($smarty'p_iterator');

    if(!
$flag[$parent_params['id']])
    {
        
$flag[$parent_params['id']]=1;
        return;
    }

    if(
$smarty->_paginator[$parent_params['id']]['is_alternating'])
        return;

    
$smarty->_paginator[$parent_params['id']]['content'].=$content;
    return;
}

?>