Problem/Motivation
When you first enable the module, you still need to do some leg work to configure the fb_instant_articles view mode before you can get output that you can send to Facebook. Furthermore, only fields which are configured with an FBIA prefixed field formatter are included. There are many fields for which there is no direct equivalent Facebook element, but since fields generate HTML and the FBIA PHP SDK includes a Transformer to transform arbitrary HTML into Instant Article elements, there should be no reason why we can't support non-FBIA prefixed formatters, and therefore, non-fb_instant_articles view mode. This ease the setup burden somewhat and more clearly illustrate the purpose of the FBIA prefixed formatters.
Proposed resolution
Update the ContentEntityNormalizer to support iterating over a non-fb_instant_articles view mode.
Add support for rendering non-FBIA prefixed fields and passing them through the FBIA PHP SDK Transformer as a way to include them in the instant article.
Remaining tasks
Implementation.
User interface changes
None.
API changes
The normalizer will assume the default entity view display if none is passed in.
Data model changes
None.
Comments
Comment #2
m4oliveiComment #3
m4oliveiReady for review: https://github.com/BurdaMagazinOrg/module-fb_instant_articles/pull/103
Comment #4
sunset_bill commentedTried it out. Works as expected.
Comment #5
m4oliveiThanks! Merged.