I wanted to add a class to the Instagram iframe, but since there isn't a twig file this was impossible from the theme layer.

Comments

Daniel Korte created an issue. See original summary.

daniel korte’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

Status: Needs review » Needs work

The last submitted patch, 2: media_entity_instagram-add-twig-template-2849240-2.patch, failed testing.

daniel korte’s picture

Status: Needs work » Needs review
StatusFileSize
new1.48 KB
slashrsm’s picture

Status: Needs review » Needs work
Issue tags: +D8Media

Is it really worth adding a template just for that? Attributes could also be added to the exisitng render array, right?

Also, #2807735: Make posts responsive seems to be adding a template too. It would be worth looking at both issues and see if we can merge them?

daniel korte’s picture

Status: Needs work » Closed (duplicate)

When you say adding attributes to the existing render array you mean via a preprocess function, right? If so, then yes — I think a Twig template is more themer-friendly and works toward the goal of having all HTML in Twig files.

It looks like #2807735: Make posts responsive probably solves this issue or makes the issue irrelevant. Closing this out as a duplicate. Thanks for reviewing!

daniel korte’s picture