Wiki Plume Community : pxSingleCatDescriptionPage1English

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
La version française est disponible ici : pxSingleCatDescriptionPage1

In order to add this function, you need to create:
- in manager/tools a folder named myfunctions
- in manager/tools/myfunctions a file named register.php

NB : the register.php file must start with a

<?php


and end with a

?>


Add the following code inside register.php:

/*
affiche la description de la catégorie uniquement sur la première page de la catégorie
display category's description only on the first page of the category
*/


function pxSingleCatDescriptionPage1($dir=1, $s='%s', $return=false)
{
    $page = config::f('category_page');
    $result = '';
        if (1 == $page) {
            $result = text::parseContent($GLOBALS['_PX_render']['cat']->f('category_description'));
        } else {
            $result = '';
        }
   
    if ($return) return $result;
    echo $result;
}


In the template category_category.php replace:

<?php pxSingleCatDescription(); ?>


by:

<?php pxSingleCatDescriptionPage1(); ?>
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.1
Page was generated in 0.2325 seconds