Jump to content

Blockcontactinfos not displaying line breaks for address


Recommended Posts

Hi,

 

I am having issues with the Block Contact Infos module displaying the address incorrectly on the front end. I am using the standard template and have modified it.

 

For some reason it displays the address as:

Address line 1 Address ine 2 City, 8000 New Zealand

 

Instead of how it appears in the admin area:

Address line 1

Address ine 2

City, 8000

New Zealand

 

Does anyone have any thoughts on how to fix this? I have tried adding <br /> inside the textarea but these are stripped out by the module.

 

Thanks

Edited by vekia (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 4 weeks later...

Hi,

 

You can fix this by adding in nl2br() to the output in blockcontactinfos.php so it becomes :

'blockcontactinfos_address' => nl2br(Configuration::get('blockcontactinfos_address'))

 

You will also need to update the template file so that it is only outputting {$blockcontactinfos_address}

 

Cheers

  • Like 1
Link to comment
Share on other sites

Hi Vekia, if the issue is that the module does not output the address with line breaks is using nl2br() not an acceptable solution? If there is a better solution for this to be outputted correctly I would be interested to find it, so that I have a better solution for the future.

 

Thanks

Link to comment
Share on other sites

×
×
  • Create New...