summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorChristian Weber2007-09-03 16:26:07 +0000
committerChristian Weber2007-09-03 16:26:07 +0000
commitac753648a8f91353e1a55161cac1c18849d1176f (patch)
treedeeecc273c816edecf5a8aeb95c31fb40e56469b /it_html.class
parente8eae647761d294a4b6c09bd8ac7afce88e87db5 (diff)
downloaditools-ac753648a8f91353e1a55161cac1c18849d1176f.tar.gz
itools-ac753648a8f91353e1a55161cac1c18849d1176f.tar.bz2
itools-ac753648a8f91353e1a55161cac1c18849d1176f.zip
add support for p['head'] in constructor, configure() and html()
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class3
1 files changed, 2 insertions, 1 deletions
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 <html lang="..."> 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