/[cvs]/nfo/php/libs/org.netfrag.flib/Site.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Site.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Thu Dec 19 06:17:32 2002 UTC revision 1.5 by jonen, Mon Dec 23 11:33:58 2002 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -------------------------------------------------------------------------------  //    -------------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.5  2002/12/23 11:33:58  jonen
7    //    + minor changes
8    //
9    //    Revision 1.4  2002/12/19 16:25:29  joko
10    //    + function loadCmsPage($template, $data_merge = array())
11    //
12  //    Revision 1.3  2002/12/19 06:17:32  joko  //    Revision 1.3  2002/12/19 06:17:32  joko
13  //    + database, smarty, and langtext (lt) now gets initialized here (on Site startup)  //    + database, smarty, and langtext (lt) now gets initialized here (on Site startup)
14  //  //
# Line 109  class Site extends Site_Boot { Line 115  class Site extends Site_Boot {
115    function &loadHandler($a) {    function &loadHandler($a) {
116      return $this->loader->loadHandler($a);      return $this->loader->loadHandler($a);
117    }    }
118    function &loadPage($a) {    function &loadPage($a, $b = array()) {
119      return $this->loader->loadPage($a);      return $this->loader->loadPage($a, $b);
120    }    }
121    function &loadTemplate($a, $b = array(), $c = "") {    function &loadTemplate($a, $b = array(), $c = "") {
122      return $this->loader->loadTemplate($a, $b, $c);      return $this->loader->loadTemplate($a, $b, $c);
# Line 153  class Site extends Site_Boot { Line 159  class Site extends Site_Boot {
159      }      }
160    }    }
161        
162      function loadCmsPage($template, $data_merge = array()) {
163        
164    //print Dumper($this->getRequest());
165        
166        // default data to provide to scope of cms
167        // TODO/REVIEW: should we be more strict here?
168        // e.g. just pass in '$site->config->url' or s.th.l.th.
169        $data = array(
170          'config' => $this->config,
171          'request' => $this->getRequest(),
172        );
173        
174        // merge in additional data
175        foreach ($data_merge as $key => $val) {
176          $data[$key] = $val;
177        }
178        
179        // load template
180        $this->loadTemplate($template, $data);
181        
182      }
183      
184  }  }
185    
186  ?>  ?>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed