Skip to main content
added 454 characters in body
Source Link
Medes
  • 41
  • 4

I just created a module and I put this in my layout file:

<?xml version="1.0"?>
<layout version="0.1.0">
    <filteredproducts_index_index>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="filteredproducts/myblock" name="myblock" template="test.phtml"/>
        </reference>
    </filteredproducts_index_index>
</layout>

Now for some reason, no mather what block I put there inside my reference name="content" tag. The block is shown twice.

test.phtml:

<?php
    echo "test";
?>

IndexController.php:

<?php
class Brightinsight_FilteredProducts_IndexController extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

}

The text shown at the page is testtest. So the content must be loaded two times for some reason I just can't seem to figure out how. Any help appreciated.

I just created a module and I put this in my layout file:

<?xml version="1.0"?>
<layout version="0.1.0">
    <filteredproducts_index_index>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="filteredproducts/myblock" name="myblock" template="test.phtml"/>
        </reference>
    </filteredproducts_index_index>
</layout>

Now for some reason, no mather what block I put there inside my reference name="content" tag. The block is shown twice.

test.phtml:

<?php
    echo "test";
?>

The text shown at the page is testtest. So the content must be loaded two times for some reason I just can't seem to figure out how. Any help appreciated.

I just created a module and I put this in my layout file:

<?xml version="1.0"?>
<layout version="0.1.0">
    <filteredproducts_index_index>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="filteredproducts/myblock" name="myblock" template="test.phtml"/>
        </reference>
    </filteredproducts_index_index>
</layout>

Now for some reason, no mather what block I put there inside my reference name="content" tag. The block is shown twice.

test.phtml:

<?php
    echo "test";
?>

IndexController.php:

<?php
class Brightinsight_FilteredProducts_IndexController extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

}

The text shown at the page is testtest. So the content must be loaded two times for some reason I just can't seem to figure out how. Any help appreciated.

Source Link
Medes
  • 41
  • 4

Content shows up two times

I just created a module and I put this in my layout file:

<?xml version="1.0"?>
<layout version="0.1.0">
    <filteredproducts_index_index>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="filteredproducts/myblock" name="myblock" template="test.phtml"/>
        </reference>
    </filteredproducts_index_index>
</layout>

Now for some reason, no mather what block I put there inside my reference name="content" tag. The block is shown twice.

test.phtml:

<?php
    echo "test";
?>

The text shown at the page is testtest. So the content must be loaded two times for some reason I just can't seem to figure out how. Any help appreciated.