1
votes

I have a magento website with multiple stores. I would like to setup CMS pages with the store name in it. I can create a page for each store, but I prefer to use one page with the store name dynamically in it. You can do the same with transactional emails and use variables like {{var order.getStoreGroupName()}}. Using this makes no sense, as it's related to an order, but I hoped that something similar would work for the store object itself.

This question seems to be related, and I have tried those solutions, but it doesn't work:

Magento CMS Page/Static Blocks - How to display store name?

One of the solution links to the following page:

http://forrst.com/posts/Get_Store_Information_in_Magento_templates_or_CM-VOh

According to the above explanation, you should be able to use the following variable:

{{config path="general/store_information/name"}}

In admin->system->configuration, general->store information, you see the store name. When I use this in the CMS page, it displays this code, not the storename. In the admin it says "store name", so I tried that instead of "name", but that didn't help.

I prefer not to edit the PHP code for now. Is it possible to do this?

2
{{config path="general/store_information/name"}} is correct and shout definitely work. The store name is only displayed correctly in the front end - not in the WYSIWYG editor. - Alex
Yep it's totally correct - Jscti
Actually I tested this with Magento 1.7 - I do not know how the situation is with 1.4. When you hide the WYSIWYG editor and press "insert variable": Do you have an option to insert the store name? - Alex

2 Answers

3
votes

In magento (v1.7) you can use one of those two method (assuming that you have enter your store info in Admin -> Config -> General -> Store Info). The WYSIWYG editor is converting your code to html entities

enter image description here

1
votes

In Cms:

Gets the current store's name

{{config path="general/store_information/name"}}

Nb: dont forget to config the name of your store in : admin->system->configuration, general->store information select the store in top left corner and set the name of your store that you want to show.