How to use Shortcodes in Magento CMS HTML

Short codes are a simple set of functions for creating macro codes for use in CMS pages or blocks. Magento has its own short codes, which you can use in Magento CMS pages, Product pages, Category pages or blocks. Magento short code syntax is fairly simple to understand as the real short code is placed inside double curly braces.


In this, the {{store url=""}} is replaced by the actual store URL. Apart from that, there are other Magento short codes which I have listed below:


Direct URL parameter appends the store’s base URL to your path, which you can use to create category or subcategory pages, i.e.


2. URL

By using Magento’s built in routes, the URL short code generates your Magento store’s URL, which can be appended to create any URL, i.e.


which will result in something like this:


Used for generating URLs with query parameters, there are two ways in using the _query parameter, you can add an arbitrary query string to the URL, i.e.


Or, you can use the second parameter syntax, where you define the query parameter name with the parameter itself, i.e.



This will result in this:

Hans-Eirik Hanifl

view all posts

Hans-Eirik Hanifl is a forward thinking e-commerce and marketing consultant. As an advocate for the free exchange of knowledge, he founded E-Commerce Gorilla as a place where like-minded individuals can ask questions and share their expertise on practical solutions in the area of e-commerce and marketing. He is the owner of TRM Marketing and an avid supporter of the open source community.

0 Comments Join the Conversation →

Leave a Reply

Stay in the loop!

E-Commerce Gorilla Avatar

Join the E-Commerce Gorilla e-mail newsletter. We provide monthly updates on new articles featuring all aspects of online sales and E-Commerce setup. We cover the do's and don'ts of effective online sales, along with great giveaways. As a newsletter subscriber you are automatically entered for any competitions and giveaways.* Join our community of engaged online marketing experts, great content, and great giveaways. You can't go wrong.