public static function getTemplate($tag, $produce_error=true)
        {
//          get the template
            $template_name = isset($tag['attributes']['template']) === true ? $tag['attributes']['template'] : 'default';
            if(is_array(CustomTags::$tag_directory_base) === false)
            {
                CustomTags::$tag_directory_base = array(CustomTags::$tag_directory_base);
            }
            foreach (CustomTags::$tag_directory_base as $directory)
            {
                $template = rtrim($directory, DIRECTORY_SEPARATOR).$tag['name'].DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR.$template_name.'.html';
                if(is_file($template) === true)
                {
                    return file_get_contents($template);
                }
            }
//          template doesn't exist so produce error if required
            if($produce_error === true)
            {
                CustomTags::throwError($tag['name'], 'tag template resource not found.');
            }
            return false;
        }
public static function getTemplate($tag, $produce_error=true)
        {
//          get the template
            $template_name = isset($tag['attributes']['template']) === true ? $tag['attributes']['template'] : 'default';
            if(is_array(CustomTags::$tag_directory_base) === false)
            {
                CustomTags::$tag_directory_base = array(CustomTags::$tag_directory_base);
            }
            foreach (CustomTags::$tag_directory_base as $directory)
            {
                $template = rtrim($directory, DIRECTORY_SEPARATOR).$tag['name'].DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR.$template_name.'.html';
                if(is_file($template) === true)
                {
                    return file_get_contents($template);
                }
            }
//          template doesn't exist so produce error if required
            if($produce_error === true)
            {
                CustomTags::throwError($tag['name'], 'tag template resource not found.');
            }
            return false;
        }
public static function getTemplate ( $ tag , $ produce_error = true ) { //          get the template $ template_name = isset ( $ tag [ 'attributes' ] [ 'template' ] ) === true ? $ tag [ 'attributes' ] [ 'template' ] : 'default' ; if ( is_array ( CustomTags :: $ tag_directory_base ) === false ) { CustomTags :: $ tag_directory_base = array ( CustomTags :: $ tag_directory_base ) ; } foreach ( CustomTags :: $ tag_directory_base as $ directory ) { $ template = rtrim ( $ directory , DIRECTORY_SEPARATOR ) . $ tag [ 'name' ] . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $ template_name . '.html' ; if ( is_file ( $ template ) === true ) { return file_get_contents ( $ template ) ; } } //          template doesn't exist so produce error if required if ( $ produce_error === true ) { CustomTags :: throwError ( $ tag [ 'name' ] , 'tag template resource not found.' ) ; } return false ; }
Returns the content of a template.
@access public
@param array $tag The tag array.
@param boolean $produce_error If there is an error with the template and this is set to true then an error is produced.
Returns the content of a template .