Hi,
I wanna an ability to set new variables in Layout.Html in some gadget.
for example : (site-title2, site-name3, my_var, current_yyy, x_y, ...)
I modify Jaws_Layout class(include/jaws/Layout.php) for this features.
Add below code :
/**
* Extra Varibles
*
* @access private
* @var array
*/
var $_ExtraVariables = array();
/**
* Set Extra Variables
*
* @access public
*/
function SetExtraVariable($VariablesArray)
{
$this->_ExtraVariables = $VariablesArray;
}
And modify :
/**
* Shows the HTML of the Layout.
*
* @access public
*/
function Show($res_echo = true)
{
$headContent = $this->GetHeaderContent($this->_HeadLink, $this->_ScriptLink, $this->_HeadMeta, $this->_HeadOther);
if (!empty($headContent)) {
$this->_Template->SetBlock('layout/head');
$this->_Template->SetVariable('ELEMENT', $headContent);
$this->_Template->ParseBlock('layout/head');
}
//Set Extra Variables
$this->_Template->SetVariablesArray($this->_ExtraVariables);
....
Please add this feature :)