At the moment there's only the default display handler. It would be really cool if there was a "natural language" display handler, for example rather than:

Nodes:
- Node1
- Node2
- Node3

We could have:

Nodes: Node1, Node2, and Node3

CommentFileSizeAuthor
#2 Formatter-1015732-2.patch983 bytesdpi
#1 relation_nobullets.patch2.68 KBFirewolf

Comments

Firewolf’s picture

StatusFileSize
new2.68 KB

Today I was actually looking for something similar. I did not want the links on one line but I wanted to get rid of the bullets. So I made a small hack. Attached you will find the patch.

When on the 'manage display' tab, you select 'inline' for the label and 'No bullets' for the format, and if you only have 1 link, then it shows nicely inline with the field label... a little bit in the direction you are looking for...

Perhaps the hack is useful for the module... for me it was just a first try-out with D7 development... and also because I am very interested in the relation module for some new web app ideas... so I might have a look at other rendering formats in the future...

dpi’s picture

Title: Natural language display handler » Custom Field Formatters
Status: Active » Needs review
Issue tags: +field, +formatter
StatusFileSize
new983 bytes

To customize this, you should try to override theme_links. Otherwise a custom field formatter will also do the trick:

I have developed a custom formatter module at https://github.com/dpi/Relation-English-Formatter .

Can we make the entity information in hook_field_formatter_prepare_view made available to all derivative formatters? It is very simple: change function name relation_field_formatter_prepare_view to relation_field_prepare_view. See attached patch.

chx’s picture

Status: Needs review » Closed (fixed)

This was before the reboot. The reboot has a dummy field and has a formatter accordingly.

clemens.tolboom’s picture