~/talk

Using Twig and Views to Create Friendly HTML E-newsletter Code

Talkat MidCamp 2020 · 2020-03-19..03-21· [web-platform, css]
links:none on file
slides:none on file

Shows how a Drupal Views page with hundreds of summaries becomes pasteable email HTML by using Twig templates to output inline styles and table cells, exposing the node with row.nid to create unique anchor IDs, and renaming templates like views-view-field.html.twig in a custom theme with Twig debug on. Covers replacing unsafe characters for ID generation, creating a Constant Contact template that accepts copied elements, and the practical failures: special character encoding and why copy/paste per section is safer than dumping the whole view.

AI-written summary · about

  1. 0:00Introduction and background
  2. 3:18Challenges with inline styles in Views
  3. 7:00Custom Twig templates explained
  4. 10:20Rewriting fields with inline styles
  5. 13:47Handling special characters in emails
  6. 16:12Creating anchor links in Views
  7. 19:55Twig variables and resources
  8. 22:30Twig Tweak module benefits
  9. 24:12Copying content to Constant Contact
  10. 25:26Q&A and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.