Hello,
I needed this functionality for a site, so I created this patch which lets you write a "story" using tokens to use as the display formatter for the relation endpoints. It adds a new formatter "Story (with Tokens)" with one text field and a token tree that includes replacements for the relation entity as well as each relation_endpoint entity.
Using the new formatter, I was able to create a display like
[party:field_email] submitted a form [relation:created:since] ago.
That displayed as
hi@example.com submitted a form 1 hour 41 min ago.
It might make more sense to package this as its own module, but I thought I would provide it as a patch initially since it was less work. Let me know what you think.
| Comment | File | Size | Author |
|---|---|---|---|
| relation-formatter-story.patch | 6.05 KB | jlyon |
Comments
Comment #1
mikran commentedI don't have experience of that field widget a lot. But I think this would definitely be a nice improvement to usefulness of that module.
Comment #2
mikran commentedrelation-formatter-story.patch queued for re-testing.
Comment #4
naught101 commentedHi jlyon, could you please re-post your patch, and make sure it's against the latest dev version? Preferably use git, as per the instructions at https://drupal.org/node/1054616
Comment #5
jmdall commentedrelation-formatter-story.patch queued for re-testing.
Comment #7
naught101 commentedclosed #2022909: Variations for natural language formatter as a duplicate of this.