1

I have defined a CMS/Static block in the magento admin called: slick_slideshow, it has content and is enabled

I've updated my page.xml and added:

<block type="cms/block" name="slick_slideshow"></block>

to the default section immediately following the breadcrumbs block.

in my 1column.phtml after the breadcrumbs block I've added:

<?php echo $this->getChildHtml('slick_slideshow') ?>

Cache is currently disabled, but nothing shows up!! Ideally I need this to only show on the homepage. but it won't show up on any page right now.

What could the issue be?

1
  • You added very little code / context in your question. I'm not totally sure, but it could be that getChildHtml() requires the alias set with as and not the name set with name. But I can't look it up right now and I'm not totally sure. Are you placing it into the correct update handle?
    – hakre
    Commented Jul 27, 2015 at 21:00

1 Answer 1

2

It should look like this:

<block type="cms/block" name="slick_slideshow">
     <action method="setBlockId"><block_id>slick_slideshow</block_id></action>
</block>

and then in the template:

<?php echo $this->getChildHtml('slick_slideshow') ?>

All your changes should be in local.xml (convention).

1
  • I swear I tried it with the action tag!! Commented Jul 28, 2015 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.