I initialize my placeholder like so:
default.phtml (layout file)
<?php $this->placeholder('hero')->captureStart(); ?>
<div class="primary">
<h1>Foo bar!</h1>
</div>
<?php $this->placeholder('hero')->captureEnd(); ?>
<?php echo $this->placeholder('hero'); ?>
index.phtml (view script file)
<?php $this->placeholder('hero')->captureStart(); ?>
<div class="primary">
<h1>Bar Baz!</h1>
</div>
<?php $this->placeholder('hero')->captureEnd(); ?>
<?php echo $this->placeholder('hero'); ?>
Output:
In my output i end up getting both headings. I just want Bar baz to display.
Bar Baz!
Foo Bar!
How do i just replace/override the contents inside my view script of the placeholder?
the default setting for
captureStart()(Check Example #13) isappendtrying setting it toset: