How to define outer template

From PeopleAggregator

Jump to: navigation, search

<?php class AdsByGoogleModule extends Module {

 public $max_height;
 public $outer_template = 'outer_public_side_module.tpl';
//This is a outer templete for this module
 function __construct() {    
   $this->block_type = 'GoogleAds';
   $this->html_block_id = 'AdsByGoogleModule';
 }
 function render() {
   $this->inner_HTML = $this->generate_inner_html ();
   $content = parent::render();
   return $content;
 }
 
 function generate_inner_html () {
  switch ( $this->mode ) {
     default:
       $inner_template = dirname(__FILE__).'/side_inner_public.tpl';      
   }
   $obj_inner_template = & new Template($inner_template);    
   $inner_html = $obj_inner_template->fetch();
   return $inner_html;
 }

} ?>

Personal tools