Location: PHPKode > projects > PHP CMS Generator > phpcmsgenerator-0.3.2/phpcmsgenerator/plugins/modifier.default.php
<?php

/*
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     modifier
 * Name:     default
 * Purpose:  designate default value for empty variables
 * -------------------------------------------------------------
 */
function smarty_modifier_default($string, $default = '')
{
    if (!isset($string) || $string === '')
        return $default;
    else
        return $string;
}

/* vim: set expandtab: */

?>
Return current item: PHP CMS Generator