0

I try to call the list.phtml on the frontpage.

{{block type="catalog/product_list" category_id="5" template="catalog/product/list.phtml"}}

After i put this code on the homepage, my left and right sidebars are gone, my slider is gone, all the text is gone. and there is only one product displayed. There are 18 products in this catagory.

Any help would be appreciated!

Maybe any link would help. Nieuwe rage

I also tried to put the following code on the list.phtml but if i do so, i get totaly blank screen with navbar only!

<?php
$_nameAfter = $this->getChild('name.after');
// New if here
if($_nameAfter):
    $_nameAfterChildren = $_nameAfter->getSortedChildren();
    foreach($_nameAfterChildren as $_nameAfterChildName):
        $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
        $_nameAfterChild->setProduct($_product);
        ?>
        <?php echo $_nameAfterChild->toHtml(); ?>
    <?php endforeach; ?>
<?php endif; ?>

<?php
//set product collection on after blocks
$_afterChildren = $this->getChild('after');
if ($_afterChildren):
    $_afterChildren = $this->getChild('after')->getSortedChildren();
    foreach($_afterChildren as $_afterChildName):
        $_afterChild = $this->getChild('after')->getChild($_afterChildName);
        $_afterChild->setProductCollection($_productCollection);
    ?>
    <?php echo $_afterChild->toHtml(); ?>
<?php endforeach; ?>
<?php endif; ?>
  • Tried that, no go! – user5836 Jun 13 '14 at 11:58
  • It stops everything from loading after that single product because it is only throwing an error at that point in the code - often a syntax error. Have you checked what the error is in your error log? – zigojacko Jun 13 '14 at 12:43
  • i did a fresh install on other domain, with mage 1.9.0.1 and i got exactly the same problem! check it on rageproducten.nl – user5836 Jun 13 '14 at 14:19
  • if i turn OFF RWD template, everything works correctly – user5836 Jun 13 '14 at 14:35
  • [Fri Jun 13 13:17:19 2014] [error] [client 62.131.73.188] PHP Fatal error: Call to a member function getSortedChildren() on a non-object in /home/dkuik/domains/nieuwste-rage.nl/public_html/app/design/frontend/rwd/defa$ – user5836 Jun 13 '14 at 15:31