Problem/Motivation

Can't use translated text in 'additional_html'. Need flexibility in HTML markup.

Proposed resolution

Move all functionality which render HTML from 'addtoany.module' to Twig templates.

Remaining tasks

May be problem with latest dev version when merge.

User interface changes

None.

API changes

None.

Data model changes

None.

I discovered that AddToAny module doesn't use potential of Twig Engine to render HTML, so I created a patch that moves logic of rendering HTML in 'addtoany.module' to Twig template addtoany-standard.html.twig with additional variables. It gives us flexibility with text translation.

Also applied Drupal coding standards to the files, so you would notice there are changes in code style.

Comments

zann1e created an issue. See original summary.

zann1e’s picture

StatusFileSize
new14.51 KB
zann1e’s picture

Issue summary: View changes
zann1e’s picture

zann1e’s picture

Issue summary: View changes
zann1e’s picture

Issue summary: View changes
zann1e’s picture

StatusFileSize
new14.52 KB

Uploaded updated patch because the previous one was unable to apply.

the.tai.pen@gmail.com’s picture

StatusFileSize
new14.31 KB

Rerolled the patch for version 1.8

the.tai.pen@gmail.com’s picture

Version: 8.x-1.7 » 8.x-1.8
the.tai.pen@gmail.com’s picture

StatusFileSize
new14.33 KB

Updated version, a small issue I missed

  • micropat committed 14f67e6 on 8.x-1.x
    Issue #2911756 by zann1e: Move HTML render from code to Twig templates...
micropat’s picture

Status: Needs review » Fixed

Thanks for the patch! It's in the dev branch and should make it to 8.x-1.9.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.