Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
Module works well. Exactly what I was looking for.
In order to simplify copy &paste for non specialists user, do you know how I could remove the DOCTYPE definition in the generated output?
Thanks
Laurent
Comments
Comment #1
jbomb CreditAttribution: jbomb commentedI believe the DOCTYPE definition is generated in enews.tpl.php. That template can be overridden by copying it to the active theme directory. Once it's been copied, flush the theme cache using the devel module, drush or by resubmitting the form at http://yoursite.com/admin/build/themes. Finally, simply removing the DOCTYPE declaration from the relocated enews.tpl.php file should remove it from the output.
Comment #2
Agence Web CoherActio CreditAttribution: Agence Web CoherActio commentedHi,
This is what I've done this initially. However the DOCTYPE still remains.
After investigation, it seems to be generated by emogrifier.
Any clues on fixing this ?
Laurent
Comment #3
jbomb CreditAttribution: jbomb commentedThat is frustrating. Have you considered using hook_form_alter to replace the exported #value with a substring that starts after the first line break or the doctype declaration? It seems a little dirty, but should work as a pot boiler.
[edit]
That is to say, it's not a permanent solution, but it's the only one that comes to mind immediately.
Comment #4
Agence Web CoherActio CreditAttribution: Agence Web CoherActio commentedThanks. This is basically what I've done. As you said; not very clean but it works.
Comment #5
AaronBaumanI'm pretty sure Emogrifier adds the Doctype, via php's DOMDocument class, during the process of inlining all the CSS and whatnot.
So, yeah, form_alter is not a pretty solution, but unless you want to muck with emogrifier.php ,that's probably the best approach.
Comment #6
AaronBauman