I have a magento multistore website, I need to list all the store and create a link to their home page, for do it I create this template:
<?php $stores = Mage::app()->getWebsite()->getStores();?>
<?php foreach ($stores as $_store): ?>
<div class="store">
<div class="title">
<?php echo $this->htmlEscape($_store->getName()) ?>
</div>
<div class="description">
<p><?php echo Mage::getStoreConfig('design/head/default_description',$_store->getStoreId()); ?></p>
<a href="#" class="link-sito">Vai al sito</a>
<a class="link-to-store" href="<?php echo $this->htmlEscape($_store->getHomeUrl())?>">Vai al Negozio</a>
</div>
</div>
<?php endforeach; ?>
the code works until I have 2 store view, intact the code display all 2 view instead only one, there is a way to display only the store and link to correct home page based on current language?