Currently the Tooltip field outputs the raw contents ($row->$tooltip_field_alias) of the field selected. Therefore it is not possible to use the Views-UI to set some formating options. (Truncate text, link to node ...)

CommentFileSizeAuthor
#3 openlayers-521888.patch3.76 KBbrynbellomy

Comments

phayes’s picture

This is also true for the popup code. Although if you now select "all fields" then it themes fine.

digi24’s picture

Title: Tooltip fieldd should use views/formatted output » Tooltip field should use views/formatted output
Status: Active » Reviewed & tested by the community

Thank you very much, it works as expected.

Are there any cases, when you would not want to use "all fields" in an OpenLayers view?
edit: meanwhile I came into a situation myself, where it would be useful to have style aplied to individual fields.

brynbellomy’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.76 KB

I've solved this with a patch. Check it out. Now we're calling advanced_render() on all fields before using those fields to build the map data (it's done to tooltips/popups fields, but to everything else as well). Warning! Some fields' values will be different now. If you used any of the fields to do any kind of funky theming/styling (for example, based on node_type or something), this patch may change the values you need to test for. For ex: node_type might once have been 'group', and is now 'Group', etc.

Also solved some lingering DOS linebreaks (*shudder*).

phayes’s picture

Status: Needs review » Fixed

Committed: http://drupal.org/cvs?commit=243904

Some changes to the submitted patch. I stored rendered records separately, so we can include both rendered, and unrendered fields in the attributes. This will likely be useful for anyone who wants to add behaviors etc. that use the raw values.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.