Skip to main content
11 events
when toggle format what by license comment
Mar 9, 2019 at 16:43 vote accept rjacobsen0
Mar 5, 2019 at 19:25 answer added rjacobsen0 timeline score: 1
Mar 5, 2019 at 19:21 comment added leymannx Consider answering your own question providing the snippet that you used in the end. Maybe it helps future readers.
Mar 5, 2019 at 19:17 comment added rjacobsen0 I ended up taking a different approach. I modified the node and saved it (this will eventually happen on cron).
Mar 5, 2019 at 16:54 comment added leymannx It really depends on what you want to achieve. Sure you could build a custom field formatter to fetch data from an external API field by field and node by node and render that according your needs. But what about caching then? Maybe have a look at hook_cron and Batch operations. With that you can build something to fetch your data and then update nodes accordingly. Node cache will automatically get rebuild on node updates.
Mar 5, 2019 at 16:20 comment added rjacobsen0 Oh. Ha! Yep. That's probably just what I was looking for. Thanks! I'm still new to Drupal. Would a custom field formatter be better?
Mar 5, 2019 at 16:09 comment added leymannx Though if I follow your thoughts a little bit further, you may actually be looking for some API approach to really update existing data, instead of just overriding/preprocessing the existing data, no?
Mar 5, 2019 at 13:35 review Close votes
Mar 5, 2019 at 19:40
Mar 5, 2019 at 13:19 comment added leymannx I don't get it. You mean like with MYMODULE_preproccess_field__body(&$variables)?
Mar 5, 2019 at 13:18 history edited leymannx CC BY-SA 4.0
edited title
Mar 5, 2019 at 13:07 history asked rjacobsen0 CC BY-SA 4.0