コード例 #1
0
ファイル: templates.php プロジェクト: SymbiSoft/litprojects
function cfct_page($file = '')
{
    if (empty($file)) {
        $file = cfct_default_file('pages');
    }
    cfct_template_file('pages', $file);
}
コード例 #2
0
ファイル: core.php プロジェクト: alicam/vanilla-theme
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);
    }
}
コード例 #3
0
ファイル: utility.php プロジェクト: rascoop/carrington
/**
 * Chooses the default template to be used in the comment context
 * 
 * @param array $files A list of files to search through to find the correct template
 * @return mixed Path to the file, false if no file exists
 * 
**/
function cfct_choose_comment_template_default($files)
{
    return cfct_default_file('comment');
}