Magento Base url Markup Tag

Photo of author
Written By Ryan Rana





A wee shorty here (that might well turn into my own personal wiki). The Magento mark-up tags are very useful to use within CMS pages and static blocks. The wiki for it is great too.

However the store URL tag is no use if you are running Magento with multiple store views and you have CMS pages or static blocks which cover multiple views. In this case the store url will include (now I’m incorporating the store view into the URL here, see this post for details) the store view code.

So if you are sharing CMS pages across multiple views you are going to need to just pull in the base_url. Do it as follows;

<li><a href="{{config path='web/unsecure/base_url'}}newsletter">Newsletter</a></li>

Another very useful one is {{store direct_url=”}

You would use this in the example given below, a static block link from a blog footer to the catalog.

<li><a href="{{store direct_url='online-shop-collection.html'}}"><span></span>Order Online</a></li>

Leave a Comment