<?

/**
 * displaytemplate.mod.php
 * @package   Modules
 */

/**
 * Module name
 */
define("MOD_DISPLAYTEMPLATE",$name);

require_once(
MODULES_DIR."/template.mod.php");

// Must be at the bottom, donno why, but probably because it extends a
// class that is only included in this file.
//$modules[$name]= new DisplayTemplateModule();

/**
 * DisplayTemplateModule
 *
 * This is a module to create the content to display after succesfully
 * running the script by loading in a template. Most of the functionality
 * is in the Dummy TemplateModule
 * @package   Modules
 * @author    Herman Suijs
 * @see          TemplateModule
 */
class DisplayTemplateModule extends TemplateModule {
  var 
$name "DisplayTemplateModule";
  var 
$id MOD_DISPLAYTEMPLATE;
  var 
$execlevel 19;
  var 
$templateID "displaytemplate";

  
/**
   * Constructor
   *
   * Set options and call the superConstructor
   */
  
function DisplayTemplateModule() {
    
//$this->options[] = new Option("name:alias1:alias2","regular expression",required,stay_enabled_if_omitted,"default");
    
$this->options[] = new Option("template:displaytemplate:displayfile:templatedisplay","",true,false);
    
$this->content DISPLAY_CONTENT;
    
$this->html true;
    
$this->TemplateModule();
  } 
/* function DisplayTemplateModule... */
  
  /**
   * Do action
   *
   * Get the variables, parse the template and put the content back in the
   * FormHandler
   * @see form-handler
   */
  
function do_action() {
    global 
$formHandler,$debug;
    
//call_user_method(do_action,get_parent_class($this));
    
$this->template_action();
    if (
$this->action()) {
      
$debug->add(DB_XFLOW,$this->name,"Displaycontent changed to template");
      
//$debug->add_message("Displaycontent changed to template",$this->name);
      //$formHandler->set_content($this->tpl->return_file($this->templateID),DISPLAY_CONTENT);
      
$this->set_content();
    } 
/* if ($this->action()) */
  
/* function do_action() */

/* class DisplayTemplateModule ex... */

$modules[$name]= new DisplayTemplateModule();