/[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.4 by joko, Thu Dec 19 16:25:29 2002 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -------------------------------------------------------------------------------  //    -------------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.4  2002/12/19 16:25:29  joko
7    //    + function loadCmsPage($template, $data_merge = array())
8    //
9  //    Revision 1.3  2002/12/19 06:17:32  joko  //    Revision 1.3  2002/12/19 06:17:32  joko
10  //    + database, smarty, and langtext (lt) now gets initialized here (on Site startup)  //    + database, smarty, and langtext (lt) now gets initialized here (on Site startup)
11  //  //
# Line 153  class Site extends Site_Boot { Line 156  class Site extends Site_Boot {
156      }      }
157    }    }
158        
159      function loadCmsPage($template, $data_merge = array()) {
160        
161    //print Dumper($this->getRequest());
162        
163        // default data to provide to scope of cms
164        // TODO/REVIEW: should we be more strict here?
165        // e.g. just pass in '$site->config->url' or s.th.l.th.
166        $data = array(
167          'config' => $this->config,
168          'request' => $this->getRequest(),
169        );
170        
171        // merge in additional data
172        foreach ($data_merge as $key => $val) {
173          $data[$key] = $val;
174        }
175        
176        // load template
177        $this->loadTemplate($template, $data);
178        
179      }
180      
181  }  }
182    
183  ?>  ?>

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

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