There are some things with the Zend Action Stack Helper which are really bad and this is why i suggest you to not use this helper at all.
Here are some infos about why i suggest it:
http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/
You should really try another approach, like using a parent class with protected attribs you write during the dispatch process.
Maybe tell us what you want to do, and we can try to give you some other ideas and examples on how to solve your problem in a different way.
I will now add another solution
I think what you want to do is, building up some kind of information into a variable you can use in your view script.
Let's say you have an IndexController.php in you Application controllers folder.
class IndexController extends Zend_Controller_Action {
//add a protected attrib to your class that can be used to transfer and store data
protected $_segment = '';
//you can also add setter and getter for this attribute
public function mainAction() {
//you do some things here
//$this->view->placeholder('segment')->set('xxxxx','test');
//instead do this
$this->_segment= 'This is a';
//build your action stack and add anotherAction to your stack
}
public function anotherAction() {
//$this->view->placeholder('segment')->set('xxxxx','test');
//instead do the following
$this->_segment.= ' test';
}
/**
* Is executed before a controller Action is being executed.
*
* @return
*/
public function preDispatch() {
}
/**
* Is executed after a controller Action is being executed.
*
* @return
*/
public function postDispatch() {
//set a view variable at the end of dipatching process
$this->view->segment = $this->_segment;
}
}
In your main.phtml view script or in any other view script that gets rendered in this dispatching process, you can now use the constructed view variable like any other viwe variable.
echo $this->segment;