Update of /cvsroot/phpvortex/phpvortex
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27468
Modified Files:
APP_Base.class.php
Log Message:
Added a default title property to APP_Base
Index: APP_Base.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/APP_Base.class.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** APP_Base.class.php 13 Oct 2004 18:08:26 -0000 1.2
--- APP_Base.class.php 13 Oct 2004 20:57:51 -0000 1.3
***************
*** 46,51 ****
* 'page_name' => array(
* 'class' => 'SEC_* Class',
- * 'title' => 'Page Title',
* 'opts' => array('Section options'),
* [ 'style' => array('Page style sheet',...), ]
* [ 'layout' => array('page layout (see below)') ]
--- 46,51 ----
* 'page_name' => array(
* 'class' => 'SEC_* Class',
* 'opts' => array('Section options'),
+ * [ 'title' => 'Page Title', ]
* [ 'style' => array('Page style sheet',...), ]
* [ 'layout' => array('page layout (see below)') ]
***************
*** 53,58 ****
* </pre>
* If exists, the $db member variable is added to the 'opts' of the page.
! * If 'opts'['style'] is set, it is used instead of the default styles.
! * If 'opts'['layout'] is set, it is used instead of the default layout.
*
* @var array
--- 53,59 ----
* </pre>
* If exists, the $db member variable is added to the 'opts' of the page.
! * If 'title' is set, it is used instead of the default title.
! * If 'style' is set, it is used instead of the default styles.
! * If 'layout' is set, it is used instead of the default layout.
*
* @var array
***************
*** 82,85 ****
--- 83,93 ----
/**
+ * Default title to site pages.
+ *
+ * @var string
+ */
+ var $title = '';
+
+ /**
* Constructor: Load all parameters into member variables.
*
***************
*** 121,124 ****
--- 129,137 ----
$style = $this->styles;
}
+ if (isset($this->pages[$page]['title'])) {
+ $title = $this->pages[$page]['title'];
+ } else {
+ $title = $this->title;
+ }
if (isset($this->pages[$page]['opts'])) {
$opts = $this->pages[$page]['opts'];
***************
*** 134,138 ****
'class' => 'SEC_Header',
'opts' => array(
! 'title' => $this->pages[$page]['title'],
'styles' => $style
)
--- 147,151 ----
'class' => 'SEC_Header',
'opts' => array(
! 'title' => $title,
'styles' => $style
)
|