magento - How to get the base url of a specific store view in a static block? -
i know in .phtml file example:
<?php echo $this->helper('derco_core')->getstoreurl('dcmotosesp')?> i want same thing inside static block. in advance.
there no 'clean' way of getting url specific store using shortcodes ({{store url}}).
...because store shortcode handler end (see mage_core_model_email_template_filter::storedirective()):
return mage::app()->getstore(mage::getdesign()->getstore())->geturl($path, $params); this means store cannot passed parameter.
the following might work it's bit ugly. idea send parameter ___store through $_get telling magento switch specific store.
<a href="{{store url="some/url/here" _query="___store=store_code_here"}}">test link</a> (replace 'store_code_here' specific store code).
an other option extend method mentioned above , allow receive store_code parameter.
Comments
Post a Comment