Update of /cvsroot/phpvortex/phpvortex
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16548
Modified Files:
SEC_Header.class.php SEC_Page.class.php
Log Message:
Improved HEAD support in SEC_Header and SEC_Page
Index: SEC_Page.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/SEC_Page.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SEC_Page.class.php 6 Oct 2004 14:02:10 -0000 1.1
--- SEC_Page.class.php 6 Oct 2004 17:25:45 -0000 1.2
***************
*** 22,25 ****
--- 22,39 ----
{
/**
+ * Array with the header of the page.
+ *
+ * The header is an array containing the section to use as header of the page in the following form:
+ * <pre>
+ * array( 'class' => 'Section Class', // Usually SEC_Header or a descendant
+ * 'opts' => array('Section options') );
+ * </pre>
+ * It is always sent before the BODY and all layout.
+ *
+ * @var array
+ */
+ var $header = array();
+
+ /**
* Array with the layout of the page.
*
***************
*** 57,60 ****
--- 71,78 ----
{
parent::SEC_Base($opts);
+ if (!empty($this->header)) {
+ $this->AddSection('header', $this->header['class'], $this->header['opts']);
+ }
+ $this->AddSection('body_open', 'SEC_Static', array('code' => "<body>\n"));
if (!empty($this->layout)) {
foreach ($layout as $sect) {
***************
*** 65,68 ****
--- 83,87 ----
$this->AddSection('content', $this->content['class'], $this->content['opts']);
}
+ $this->AddSection('body_close', 'SEC_Static', array('code' => "</body>\n"));
}
Index: SEC_Header.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/SEC_Header.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SEC_Header.class.php 6 Oct 2004 14:02:10 -0000 1.1
--- SEC_Header.class.php 6 Oct 2004 17:25:45 -0000 1.2
***************
*** 29,32 ****
--- 29,39 ----
/**
+ * Array containing URLs to style sheets.
+ *
+ * @var array
+ */
+ var $styles = array();
+
+ /**
* Outputs the section to the client.
*
***************
*** 37,40 ****
--- 44,50 ----
echo "<head>\n";
if (!empty($this->title)) echo "<title>{$this->title}</title>\n";
+ if (!empty($this->styles)) {
+ foreach ($this->styles as $style) echo "<link href='$style' rel='stylesheet' type='text/css' />\n";
+ }
parent::Show();
echo "</head>\n";
|