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) »
  • Header and footer HTML
Pages: [1]

Author Topic: Header and footer HTML  (Read 553 times)

michaelhayes

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
  • CiviCRM version: 3.4.7
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.3.9
  • PHP version: 5
Header and footer HTML
April 04, 2014, 12:46:06 pm
I have a questions about these. Do you include your document starting tags (<HTML><head><body> for example) in the header, and the closing tags for everything in the footer? Does this apply to closing anything you might have open in the main body like table tags? I'm just wondering the best way to pull this off without getting missing tags when the whole message renders.

Also, I'm a little fuzzy on the use of the compulsory domain.address token. Does need to render as visible text or can I dump it into a meta tag? I have an unsub tag in my footer that seems to send and work without the domain.address token but wasn't sure about the best way to include them all. Also, I suspect the codex for tokens may have a few errors, especially with whether or not quotes are needed when these are coded into a link tag for example.

Owen

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 2
    • Leukaemia & Lymphoma Research
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7
  • MySQL version: -
  • PHP version: -
Re: Header and footer HTML
April 05, 2014, 06:38:18 am
That's how we do it RE headers/footers, it's tyhe only way I've found of being able to put the necessary css in without the wyswyg stripping it. We keep the footer just for closing the tags and have the 'content' footer in the message template.

Header

Quote
<html><header>[css etc]</header><body>

Message Template

Quote
<table> [content] </table>

Footer

Quote
</body><html>

michaelhayes

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
  • CiviCRM version: 3.4.7
  • CMS version: Drupal 6.26
  • MySQL version: 5.1.3.9
  • PHP version: 5
Re: Header and footer HTML
April 07, 2014, 10:43:21 am
Thanks man, but I'm not sure if that works. From what I've seen, folks are putting their banner and info in the header, and all their unsub fine print in the footer, so the header and footer function more like they do in an actual print document. this way those elements are always present and the composer of a mail message just has to worry about the content.

I suppose I can just verify this myself, but I'm curious if the doc breaks in the editor because it's missing key HTML tags or not.

Owen

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 2
    • Leukaemia & Lymphoma Research
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7
  • MySQL version: -
  • PHP version: -
Re: Header and footer HTML
April 07, 2014, 11:13:38 am
Quote
Thanks man, but I'm not sure if that works. From what I've seen, folks are putting their banner and info in the header, and all their unsub fine print in the footer, so the header and footer function more like they do in an actual print document. this way those elements are always present and the composer of a mail message just has to worry about the content.

That works too, we switch the header banner fairly often so it's better in the wysywyg. The important bit is not to put

<html><header>[css etc]</header><body>

in the message template.

You can switch it to :

Header

<html><header>[css etc]</header><body>
<table>[header table]</table>

Message Template

<table> [main content] </table>


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Header and footer HTML

This forum was archived on 2017-11-26.