Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (11)

View Page History
1.2 - 30 Aug 2007: Updated proposal with new class skeletons
1.3 - 21 Sep 2007: Updated with layout view helper and Zend_View_Inflection
1.4 - 27 Sep 2007: Updated with layout variable placeholder implementation
{zone-data}


{zone-data:milestones}
* Milestone 1: \[DONE\] [design notes will be published here|http://framework.zend.com/wiki/x/sg]
* Milestone 2: \[DONE\] Working prototype @ http://svn.ralphschindler.com/repo/ZendFramework/Zend_Layout/
* Milestone 3: Working prototype checked into the incubator supporting use cases
* Milestone 4: Unit tests exist, work, and are checked into SVN.
// - or $layout = new Zend_Layout(array('path' => APPLICATION_PATH . 'user/layouts/', 'view' => $view));

// SET DEFAULT LAYOUT - this will set "APPLICATION_PATH/user/layouts/scripts/sub-path.phtml" "APPLICATION_PATH/user/layouts/scripts/sub-page.phtml"
// (layouts/scripts) assumes that you are using a view object of type Zend_View.
$layout->setLayout('SubPage');
{
$this->_helper->layout->disableLayout();
// optionally
$this->_helper->layout->setLayout(false);
}
}
{code}

h4. Layout script
{code:php}
<?= $this->docType('xhmt1-transitional') ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?= $this->headTitle() ?></title>
</head>
<body>
<? // 'default' content ?>
<?= $this->layout()->default ?>
</body>
</html>
{code}

{zone-data}

/**
* Set layout script to use
*
* If set after disableLayout() called, implicitly re-enables layout.
*
* @param string $name

/**
* Set layout variable prefix for injected variables
*
* @param string $prefix
* @return Zend_Layout
*/
public function setLayoutVarPrefix($prefix)
{}

/**
* Get current layout variable prefix
*
* @return string
*/
public function getLayoutVarPrefix()
{}

/**
* Set view object
*

/**
* Is a layout variable set?
*
* @param string $key
* @return bool
*/
public function __isset($key)
{}

/**
* Unset a layout variable?
*
* @param string $key
* @return void
*/
public function __unset($key)
{}

/**
* Assign one or more layout variables
*
* @param mixed $spec Assoc array or string key; if assoc array, sets each
* key as a layout variable
* @param mixed $value Value if $spec is a key
* @return Zend_Layout