I need to manipulate a field (title) before it is rendered into the map. My customization in views-view-field--view-test--title.tpl.php has no effect.

The theming information says that openlayers-views-data.tpl.php cannot be found in sites/all/modules/openlayers/modules/openlayers_views/views. I can only find openlayers-views-map.tpl.php in the directory. I cannot find this file openlayers-views-data.tpl.php anywhere.

Thanks in advance!

Comments

tmcw’s picture

Category: bug » support

I need to manipulate a field (title) before it is rendered into the map. My customization in views-view-field--view-test--title.tpl.php has no effect.

You probably can't, and shouldn't, do tpl-level customization of the title (especially because this will affect the entire site). You should implement theme_openlayers_views_render_feature and do it there.

I cannot find this file openlayers-views-data.tpl.php anywhere.

It doesn't exist: the data is passed into the page as javascript, not HTML, so isn't, and cannot be, run through a theme file.

ckreutz’s picture

Thanks very much!
However I found two ways, which work. One is to rewrite html output in the title field in view fields. If you include here additional fields you can manipulate them through a template and they are shown together with the title field.

tmcw’s picture

Status: Active » Closed (fixed)

Great, closing.