Cnz_Html
[ class tree: Cnz_Html ] [ index: Cnz_Html ] [ all elements ]

Class: Cnz_Html_Head

Source Location: /Html/Head.php

Class Overview

Cnz_Html_Element
   |
   --Cnz_Html_Head

HTML Head class


Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods


Class Details

[line 92]
HTML Head class

This class automates the creation and display of a header block.

Where the lists are filenames, the file extension should not be included. Style filenames must have the extension .css, and client-side script files must have the extension .js.

Scripts for a given page should be stored underneath scriptDirLocal. Scripts for an entire site should be stored underneath scriptDirSite. Scripts to be shared across sites on a server should be stored in scriptDirServer. Script names may also be code-generated and fed to the constructor. Similary for styles.

Each script and style may be specified as either an absolute path or a relative path. If a relative path, then the file is taken from the site directory if the file exists, else the server directory. If scriptAuto/ styleAuto is enabled, then all script/style files (judged by the file extension) in the local script/style directory are used.

Styles may be followed by a field delimiter (:) and a value for the media attribute. If no media attribute is specified, the default is all.

Example INI (defaults shown as comments):


 [htmlHead]
 ;author          = 
 ;copyright       = "Copyright © "
 description      = Description for this Site
 ;distribution    = global
 keywords         = keyword list
 organization     = Organization Name
 ;revisit         = 7 days
 ;robots          = index,follow
 scripts          = mootools
 ;scriptAuto      = yes
 ;scriptDirLocal  = script/
 ;scriptDirServer = /slib/script/
 ;scriptDirSite   = /lib/script/
 styles           = main:all,another:all
 ;styleAuto       = yes
 ;styleDirLocal   = style/
 ;styleDirServer  = /slib/style/
 ;styleDirSite    = /lib/script/
 ;title           = 
 

Example PHP:

  1.  $htmlHead Cnz_Html::loadAndDisplay('Cnz_Html_Head');




[ Top ]


Class Methods


method display [line 278]

void display( [string $style = NULL])



Tags:

access:  public


Overrides Cnz_Html_Element::display() (parent method not documented)

Parameters:

string   $style   Unused

[ Top ]

method getCopyright [line 146]

string getCopyright( )



Tags:

return:  Copyright
access:  public


[ Top ]

method getOrganization [line 152]

string getOrganization( )



Tags:

return:  Organization
access:  public


[ Top ]

method getTitle [line 158]

string getTitle( )



Tags:

return:  Title
access:  public


[ Top ]

constructor __construct [line 195]

Cnz_Html_Head __construct( [ $options = array()])

Option fields:

string keywords List of additional keywords string scripts List of additional client-side scripts string styles List of additional CSS styles string subtitles List of page subtitles

Configuration fields: author Value for author meta tag (default organization) copyright Value for copyright meta tag (default Copyright © author) description Value for description meta tag (default none) distribution Value for distribution meta tag (default global) keywords Value for keywords meta tag (default none) organization Value for organization meta tag (required) revisit Value for revisit meta tag (default 7 days) robots Value for robots meta tag (default index,follow) scripts List of client-side scripts to include (default none) scriptAuto Automatically include scripts in local script dir (default yes). scriptDirLocal Local script directory (default script/) scriptDirServer Server script directory (default /slib/script/) scriptDirSite Site script directory (default /lib/script/) styles List of styles to include (default none) styleAuto Automatically include stypes in local style dir (default yes). styleDirLocal Local style directory (default style/) styleDirServer Server style directory (default /slib/style/) styleDirSite Site style directory (default /lib/style/) title Site title (default none)




Tags:

access:  public


Overrides Cnz_Html_Element::__construct() (Option fields:)

Parameters:

array   $options   Options

[ Top ]


Class Constants

DEFAULT_COPYRIGHT =  'Copyright © '

[line 96]


[ Top ]

DEFAULT_DISTRIBUTION =  'global'

[line 97]


[ Top ]

DEFAULT_MEDIA =  'all'

[line 98]


[ Top ]

DEFAULT_REVISIT =  '7 days'

[line 99]


[ Top ]

DEFAULT_ROBOTS =  'index,follow'

[line 100]


[ Top ]

DEFAULT_SCRIPT_DIR_LOCAL =  'script/'

[line 103]


[ Top ]

DEFAULT_SCRIPT_DIR_SERVER =  '/slib/script/'

[line 101]


[ Top ]

DEFAULT_SCRIPT_DIR_SITE =  '/lib/script/'

[line 102]


[ Top ]

DEFAULT_STYLE_DIR_LOCAL =  'style/'

[line 106]


[ Top ]

DEFAULT_STYLE_DIR_SERVER =  '/slib/style/'

[line 104]


[ Top ]

DEFAULT_STYLE_DIR_SITE =  '/lib/style/'

[line 105]


[ Top ]

HAS_CONFIG =  true

[line 94]


[ Top ]

PREFIX =  'HtmlHead'

[line 95]


[ Top ]

TITLE_SEPARATOR =  ' :: '

[line 107]


[ Top ]



Documentation generated on Thu, 19 Jul 2007 15:02:05 -0400 by phpDocumentor 1.4.0RC2