Ejemplo n.º 1
0
function vnl_include($template)
{
    switch ($template) {
        // page template
        case 'page':
            $file = cfct_default_file('pages');
            cfct_template_file('pages', $file);
            break;
            // content template
        // content template
        case 'content':
        case 'excerpt':
            $file = cfct_choose_content_template($template);
            cfct_template_file($template, $file);
            break;
            // comment template
        // comment template
        case 'comment':
            $file = cfct_choose_comment_template($template);
            cfct_template_file($template, $file);
            break;
            // forms template
        // forms template
        case 'comment-form':
        case 'search':
            cfct_template_file('forms', str_replace('-form', '', $template));
            break;
            // misc template
        // misc template
        case 'banner':
        case 'image':
        case 'nav-posts':
            cfct_template_file('misc', $template);
            break;
            // error template
        // error template
        case '404':
        case 'exit':
            cfct_template_file('error', $template);
            break;
            // general template (everything else!)
        // general template (everything else!)
        default:
            $file = cfct_choose_general_template($template);
            cfct_template_file($template, $file);
    }
}
Ejemplo n.º 2
0
function cfct_comment($data = null)
{
    $file = cfct_choose_comment_template();
    cfct_template_file('comment', $file, $data);
}
Ejemplo n.º 3
0
function cfct_comment()
{
    $file = cfct_choose_comment_template();
    cfct_template_file('comment', $file);
}