SPRBRN
SPRBRN

Reputation: 2462

Magento: show store name in a CMS page

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?

Upvotes: 1

Views: 4817

Answers (2)

PЯINCƎ
PЯINCƎ

Reputation: 724

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.

Upvotes: 1

MagePal Extensions
MagePal Extensions

Reputation: 17656

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

Upvotes: 3

Related Questions