CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Change the footer layout with {domain.address}
Pages: [1]

Author Topic: Change the footer layout with {domain.address}  (Read 1035 times)

petbos157

  • I’m new here
  • *
  • Posts: 26
  • Karma: 2
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1.71
  • PHP version: 5.3.3
Change the footer layout with {domain.address}
August 11, 2009, 01:01:25 am
I use the {domain.address} in my footer for our mailings. But each adress line comes with a <br> at the end.
How can i change the footer layout, so there will be no <br> at the end. So that our whole adress can be put in one line.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Change the footer layout with {domain.address}
August 11, 2009, 01:35:42 am
petbos157 :

You should apply the following patch to replace <br /> with comma or whatever separator you want as shown below in CRM/Utils/Token.php
Code: [Select]
Index: CRM/Utils/Token.php
===================================================================
--- CRM/Utils/Token.php (revision 23229)
+++ CRM/Utils/Token.php (working copy)
@@ -221,7 +221,7 @@
             /* Construct the address token */
             if ( CRM_Utils_Array::value( $token, $loc ) ) {
                 $value = $loc[$token][1]['display'];
-                if ($html) $value = str_replace("\n", '<br />', $value);
+                if ($html) $value = str_replace("\n", ',', $value);
                 $addressCache[$cache_key] = $value;
             }

You may want to use custom templates(read more on http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in%2C+Profile%2C+Contribution+and+Event+Registration+Screens) for achieving this.
HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Change the footer layout with {domain.address}

This forum was archived on 2017-11-26.