phpDocumentor templates
[ class tree: templates ] [ index: templates ] [ all elements ]

Procedural File: _template.funcs.php

Source Location: /qp_inc/templates/_template.funcs.php

Page Details

This file implements Template tags for use with templates.

This file is part of the Quam Plures project - http://quamplures.net/. See also https://launchpad.net/quam-plures.

Author:  blueyed: Daniel HAHLER.
Author:  fplanque: Francois PLANQUE.
Copyright:  (c)2003-2009 by Francois PLANQUE - http://fplanque.net/. Parts of this file are copyright (c)2004-2005 by Daniel HAHLER - http://thequod.de/contact.
Copyright:  (c) 2009 - 2011 by the Quam Plures developers - http://quamplures.net/
Filesource:  Source Code for this file
License:  GNU General Public License (GPL)
Functions
is_default_page  [line 434]

boolean is_default_page( )

Tells if we are on the default blog page



[ Top ]
template_404_header  [line 693]

void template_404_header( )

Sends the desired HTTP response header in case of a "404".



[ Top ]
template_base_tag  [line 530]

void template_base_tag( )

T-Tag: Outputs the "base href" tag for the current template.

This is needed for relative css and img includes.


API Tags:
Uses:  base_tag()


[ Top ]
template_container  [line 798]

void template_container( string $sco_name, [array $params = array()]  )

T-tag: Display a container's widgets

Param priorities: widget, container, defaults

Parameters:
string   $sco_name: 
array   $params: 

API Tags:
Uses:  Template::container()
Uses:  ComponentWidget::init_display()
Uses:  ComponentWidget::display()


[ Top ]
template_content_header  [line 729]

void template_content_header( [ $type = 'text/html']  )

Obsolete Template Tag

Parameters:
   $type: 

Information Tags:
Todo:  EdB: this is obsolete from way back. The only thing it does is help an old skin act like a new template

[ Top ]
template_content_meta  [line 740]

void template_content_meta( [string $type = 'text/html']  )

T-Tag: Outputs the "meta http-equiv Content-Type" tag

Parameters:
string   $type:  content-type; override for RSS feeds


[ Top ]
template_description_tag  [line 566]

void template_description_tag( )

T-Tag: Outputs the "meta name description" tag

Note for future mods: we do NOT want to repeat identical content on multiple pages.



[ Top ]
template_exists  [line 887]

boolean template_exists( template $name, [ $filename = 'index.main.php']  )

Checks if a template exists. This can either be a regular template directory or can be in the list Plugin::GetProvidedTemplates().

Used by front-end.

Parameters:
template   $name:  name (directory name)
   $filename: 

API Tags:
Return:  true is exists, false if not


[ Top ]
template_feed_tags  [line 614]

void template_feed_tags( )

Get auto-discovery feed tags

Creates auto-discovery links for the <head> section based on what feed templates are installed



[ Top ]
template_file_exists  [line 913]

boolean template_file_exists( template $name, [file $filename = 'index.main.php']  )

Checks if a specific file exists for a template.

Parameters:
template   $name:  name (directory name)
file   $filename:  name

API Tags:
Return:  true is exists, false if not


[ Top ]
template_include  [line 446]

void template_include( $template_name, [ $params = array()]  )

T-tag: Include a sub-template at the current position

Parameters:
   $template_name: 
   $params: 

Information Tags:
Todo:  EdB: $disp_handler is very nice :)

[ Top ]
template_init  [line 37]

void template_init( string &$disp  )

Template tag. Initializes internal states for the most common template displays.

For more specific template, this function should not be called and equivalent code should be customized within the template.

Parameters:
string   &$disp:  What are we going to display. Most of the time the global $disp should be passed.


[ Top ]
template_install  [line 814]

Template|bool &template_install( string $template_folder  )

Install a template

Parameters:
string   $template_folder:  The folder name of the template to install.

API Tags:
Return:  A Template object on success, false on failure.

Information Tags:
Todo:  do not install if template doesn't exist. Important for upgrade. Need to NOT fail if ZERO templates installed though :/

[ Top ]
template_installed  [line 934]

boolean template_installed( Template $name  )

Check if a template is installed.

This can either be a regular template or a template provided by a plugin.

Parameters:
Template   $name:  name (directory name)

API Tags:
Return:  True if the template is installed, false otherwise.


[ Top ]
template_keywords_tag  [line 652]

void template_keywords_tag( )

T-Tag: Outputs the "meta name keywords" tag

Note for future mods: we do NOT want to repeat identical content on multiple pages.



[ Top ]
template_provided_by_plugin  [line 856]

false|integer template_provided_by_plugin( $name  )

Checks if a template is provided by a plugin.

Used by front-end.

Parameters:
   $name: 

API Tags:
Return:  False in case no plugin provides the template or ID of the first plugin that provides it.
Uses:  Plugin::GetProvidedTemplates()


[ Top ]
template_widget  [line 757]

void template_widget( array $params  )

T-tag: Display a Widget

This load the widget class, instantiates it, and displays it.

Parameters:
array   $params: 

API Tags:
Uses:  ComponentWidget::init_display()
Uses:  ComponentWidget::display()


[ Top ]