Need help buying now? +358 9-424-505-31 +1 888-886-76-81
My Cart

Your Cart is Empty

Need help buying now?
+358 9-424-505-31 +1 888-886-76-81

Template Tags: What Magento Store Owners Should Know

Magento tags

In order to configure the necessary block or design special code parts can be used. Magento ®  tags are used in the theme files, blogs, email notifications and on the store pages.

What template tags are

eCommerce templates tag is a part of code enclosed in brackets which contain certain information important for the system to operate. For example: {{domain=""}}. Template tags can be used for different purposes but they are most necessary in order to:

1. Place links on an online store page without entering a domain name;

2. Install a certain block on a certain store page for the edition of layers and other theme files.

You can use such tags in different blocks on your site pages.

How to use template tags

As an easy example, let’s say you wish to place a banner on your storefront main page indicating that you will be offering holiday discounts up to 60%. You can edit the main page using the following steps. Go to the admin panel then open the home page. The exact path would be CMS - Manage Pages - Home Page.

You will see the home page source code which you can edit as desired. But you should be careful as this is the main page of your site that you edit. If you do not have enough programming skills it would be better to ask the GoMage development team for assistance.

There are two ways to install a banner. First, add the following code to a link to an image created using Photoshop:

<img src="http://www.domain.com/skin/frontend/default/default/images/media/50sale.jpg" 
alt="" />

 

 

Using the template tag you can add the following code:

<img src="https://www.gomage.com/skin/frontend/base/default/images/media/about_us_img.jpg" alt="" />

 

 

It is also very convenient to use the tags responsible for the creation of a static block on your site. E.g. this tag is responsible for a block with a certain identifier. That could be

. You can change static blocks in the admin panel, in CMS > Static Blocks.

There is also a tag that will cancel all layout HTML tags. It is a very useful option if you need to partially edit a page. You can specify the tags that must not be canceled using allowed_tags attribute. List the necessary attributes divided by commas. A working tag looks like this:


 

 

How do such Magento ® tags work? All links existing on the site will be displayed as simple text but they will not be indexed by search engines.

The tag can be used to setup HTML layers output. When this option is being configured it is necessary that selected ‘handle’ has the name of a specific layer that is used on the site.

Not a very useful tag, as full media files’ paths are not usually specified in eCommerce, but still widely used one is https://www.gomage.com/media/”. It helps to output a full path of a specific file in Magento ®.

For example, if you add https://www.gomage.com/media/catalog/product/l/s/dress.jpg you will see this link as a result of a product image http://www.domain.com/media/catalog/product/l/s/dress.jpg.

The tag https://www.gomage.com/”/ is also very useful. It adds the store URL to the database. Also, this tag will automatically add a slash at the end. It is very important to not leave the URL field blank or you will be redirected to the store home page.

For example:

https://www.gomage.com/about-magento-demo-store/

 

 

The resulting URL will be:

http://www.domain.com/index.php/about-magento-demo-store/

 

 

The tag https://www.gomage.com/” performs the same function but it does not add a slash at the end of the URL.