Skip to main content
stopopol's user avatar
stopopol's user avatar
stopopol's user avatar
stopopol
  • Member for 8 years, 4 months
  • Last seen this week
  • Austria
asked
Loading…
revised
Custom formatter for paragraphs field
added 109 characters in body
Loading…
Loading…
revised
Loading…
comment
REST Export Serializer adds quotation marks to my field
It doesn't make a difference to me if it is a normaliser or a field formatter, I just need my json export to be able to render paragraphs as arrays properly. At first I thought the field formatter approach would be best, but then I ran into the serialising problem. So I think that I'm going to try writing my own normaliser next.
revised
Loading…
revised
Loading…
Loading…
revised
Custom formatter for paragraphs field
added 107 characters in body
Loading…
awarded
answered
Loading…
comment
Custom formatter for paragraphs field
Your comment pointed me in the right direction and I looked at a few other modules and came up with this: render($item->entity->field_network_specific_site_code->valu‌​e), which prints the label of this field nicely (also for multi values).
comment
Custom formatter for paragraphs field
At first, I tried the view mode approach, but it doesn't quite fit my requirements. I'm aware that hard-coding field names is problematic, but this is a custom module and the data model is fixed. Anyway, I just tried $item->entity->field_example->value, but it doesn't return anything. No error messages in the log either.
asked
Loading…
awarded
awarded
accepted
revised
Custom widget not rendered within field group
added 144 characters in body
Loading…
revised
Custom widget not rendered within field group
added 123 characters in body
Loading…