0

I'm wanting to use the store address within a CMS Block on a Magento website, however the problem is the line breaks are not formatted with the below:

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

Previously in the template we have used:

nl2br(Mage::getStoreConfig('general/store_information/address'));

The above worked fine, but we would like to move away from the template restriction.

Is there a possible way to add line breaks/formatting to the configuration variable when its pulled through in a CMS Block. In the configuration the address is entered with line breaks.

Jonathan Garrett
  • 115
  • 1
  • 1
  • 10

1 Answers1

6

This seems to work for me:

<pre>{{config path="general/store_information/address"}}</pre>

After that, just modify your styles to requirements.

fearfelt
  • 91
  • 8
  • 3
    I recommend adding this to the CSS file (perhaps under `address`): `pre { font-family:inherit; font-style:normal; margin-bottom:5px;}` – rybo111 May 22 '15 at 10:30