Ticket #1229 (new enhancement)

Opened 1 year ago

Need new features in Jaws_Layout

Reported by: ebrahimi@zehneziba.ir Assigned to: jaws-bugs@lists.jaws-project.com
Priority: normal Milestone: 0.9.0
Component: Core / New Requests Version: 0.8.9
Severity: normal Keywords: Jaws_Layout add extra variable layout.html
Cc:

Description

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 :)

Attachments

Layout.php (31.1 kB) - added by ebrahimi@zehneziba.ir on 05/28/09 12:11:33.
new Jaws_Layout

Change History

05/28/09 12:11:33 changed by ebrahimi@zehneziba.ir

  • attachment Layout.php added.

new Jaws_Layout


Add/Change #1229 (Need new features in Jaws_Layout)




Change Properties
Action