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.

CommentFileSizeAuthor
relation-formatter-story.patch6.05 KBjlyon

Comments

mikran’s picture

Component: User interface » Dummy_field

I 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.

mikran’s picture

relation-formatter-story.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, relation-formatter-story.patch, failed testing.

naught101’s picture

Component: Dummy_field » API

Hi 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

jmdall’s picture

Status: Needs work » Needs review

relation-formatter-story.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, relation-formatter-story.patch, failed testing.

naught101’s picture