<?php

// require_once 'tpl.inc';

class Template_If extends Template
{
	
	function get_vartag_value($vartag)
	{
		$split = explode('|', $vartag, 3);
		
		return eval('return '.eval('return parent::process($split[0], MAX_DEPTH);').';')?$split[1]: $split[2];
	}
	
	function get_info()
	{
		return array("info"=>"condition. <notpl>{{If:%val1%==%val2%|%show if true%|%else%}}</notpl>.", "version"=>"0.9");
	}
}

?>