I have created multi-currency selector in header using following logic
Updated app/design/frontend/default/my_theme/layout/local.xml as per follow
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="header">
<block type="directory/currency" name="my_currency_selector" template="currency/currency.phtml"/>
</reference>
</default>
</layout>
In app/design/frontend/default/my_theme/page/html/header.phtml
added:
<?php echo $this->getChildHtml('my_currency_selector') ?>
Its works perfectly fine.
Now problem is that, I have ajax call on list page because of this I need to reload my_currency_selector
in controller.
I used following code which return me breadcrumbs block html.
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')->toHtml();
But same code is not working for currency. I tried
$currency = $this->getLayout()->getBlock('my_currency_selector')->toHtml();
Please tell me What I am mising