PHP Classes

File: plugins/block.p_alternating.php

Recommend this page to a friend!
  Classes of Anderson A. Meggiolaro   Paginator Iterator   plugins/block.p_alternating.php   Download  
File: plugins/block.p_alternating.php
Role: Auxiliary script
Content type: text/plain
Description: Alternating Template
Class: Paginator Iterator
Iterate over listings split in page using Smarty
Author: By
Last change:
Date: 15 years ago
Size: 424 bytes
 

Contents

Class file image Download
<?php

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

    if(
is_null($content)) {
        return;
    }
   
    if(!
$flag)
    {
       
$flag=1;
        return;
    }

   
$parent_params=smarty_get_parent_plugin_params($smarty, 'p_iterator');
    if(!
$smarty->_paginator[$parent_params['id']]['is_alternating'])
        return;

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

?>