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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Edit message template (adding a logo)
Pages: [1]

Author Topic: Edit message template (adding a logo)  (Read 1060 times)

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Edit message template (adding a logo)
June 09, 2011, 09:48:21 pm
Can someone please point me in the direction of some documentation on how I can add a logo to the message templates? I can find the Administer>Configure>Message Templates, but I don't recognize enough of the code to figure out how to add a logo without messing up the logic code. And I can't find enough information in the documentation and forums to even give me something to play around with and test.

I understand basic HTML, but not much more than that. Thank you for your patience with what I'm sure is such an easy question for most people here.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Edit message template (adding a logo)
June 10, 2011, 04:39:41 pm
@gholt,

If you're afraid of messing up logic then you can always revert to the default. Beautiful!

May I suggest writing a basic HTML file that has the desired appearance before you try and integrate it into the template? I find it helps to solve one problem at a time.

When I look at the default "Contribution receipt (on-line)" it contains the following lines ...
Code: [Select]
<table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">

  <!-- BEGIN HEADER -->
  <!-- You can add table row(s) here with logo or other header elements -->
  <!-- END HEADER -->

  <!-- BEGIN CONTENT -->

  <tr>
   <td>

If your header "sits on top" of your other content, then add a table row (TR) element containing the images and text.

Otherwise, if the receipt content sits as a block within the email (eg, with a header above it and a sidebar to the left), you can take advantage of the fact that the default receipt data sits inside a table, to avoid damaging the logic. (Remove the 'width="620" ' attribute etc so the table fits your template).

Don't forget to update the text version as well. I'd suggest getting the wording etc right on the HTML version and then the text version should "just fall out".

Be brave and have a go. And if it gets too hard, it may be worth hiring a HTML expert who understands generating HTML for email.

Ken

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Edit message template (adding a logo)
June 10, 2011, 07:20:08 pm
Thanks, Ken!
That was just enough encouragement and information to get me started. I didn't realize that I would have the option to revert back to the default, but I guess I could have just copied and pasted it into a text file for safe keeping. The biggest help you provided was pointing out the <!-- BEGIN HEADER --> comment line. I was so intimidated by the rest of the code that I hadn't noticed that.

So, I did some testing. But when I pasted in my header row (just from <tr> to </tr>) in between the "End Header" and "Begin Content" comment lines, everything looked fine. The rest of the code was still there below my newly inserted row code. But when I saved the template and went back to look at the code, everything was gone below my row.

What happened?

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Edit message template (adding a logo)
June 11, 2011, 04:34:15 am
Sounds odd.

I'd keep a copy of your changes in a separate file until you get that working.

gholt

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 0
Re: Edit message template (adding a logo)
June 11, 2011, 07:42:01 pm
Thanks, Ken.

I figured out what happened. I did the HTML layout in Dreamweaver, and copied and pasted from the code view. Apparently, some invisible non-ascii characters were being pasted in with the html code.

I had suspected something like that, because the saved code ended with what I had pasted in. So I pasted the same code into BBEdit and used the Zap Gremlins feature to identify any non-ascii code. Sure enough, there were two characters at the end of the code.

I have personalized receipts now. Thanks again.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Edit message template (adding a logo)

This forum was archived on 2017-11-26.