From ac753648a8f91353e1a55161cac1c18849d1176f Mon Sep 17 00:00:00 2001 From: Christian Weber Date: Mon, 3 Sep 2007 16:26:07 +0000 Subject: add support for p['head'] in constructor, configure() and html() --- it_html.class | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'it_html.class') diff --git a/it_html.class b/it_html.class index 76152d9..afc8d4e 100644 --- a/it_html.class +++ b/it_html.class @@ -40,6 +40,7 @@ function it_html($p = array()) $this->p = $p + array( 'charset' => 'iso-8859-1', 'doctype' => null, # Custom doctype (will usually be calculated from htmltype) + 'head' => '', # Code to put into head() section 'htmltype' => 'xhtml', # 'html' (=old-style), 'xhtml' or 'xhtml-mobile' 'lang' => 'de', # Language code to use in tag 'ie_png_fix' => false, # To enable, supply URL of a transparent gif (like /images/0.gif) @@ -158,7 +159,7 @@ function head($args = array()) if (!empty($p['cssinline'])) $header .= tag('style', array('type' => "text/css", "\n" . preg_replace(array('/\s*\/\*[^\*]+\*\//Um', '/\s*\{\s*/', '/;\s+/'), array('', '{', ';'), $p['cssinline']))); - $header .= tag('title', Q($p['title'])); + $header .= $p['head'] . tag('title', Q($p['title'])); if($this->p['htmltype'] == "xhtml-mobile" && strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator')) header("Content-Type: application/xhtml+xml; charset={$this->p['charset']}"); # for validation -- cgit v1.2.3