I am using the leaflet module and have a view that displays a block with the map that works. This block can be displayed on the same page layout as the node but appears below comments for the node. I would like the map block to appear above the comments immediately following the node.
The https://github.com/backdrop-contrib/eva module looked like a good option although I don't have experience with it. After installing the eva
module and clearing caches, in the view the block display was cloned as an eva field. In the Entity content settings
the entity type was identified as Node
, the bundle for the content type was selected, Show on
was to display, and Arguments
set to id
. The eva field shows on the content type as a display field.
However, when viewing the node there is an error:
Notice: Array to string conversion in include() (line 56 of \eva\templates\eva-display-entity-view.tpl.php).
and the leaflet map is not visible, only the views header is visible followed by the word Array
.
Following up on a suggestion in office hours line 56 of the tpl.php
file was changed <?php print $rows; ?>
to dpm($rows)
and the results do include the leaflet map ID.
I would appreciate any suggestions on how to get the leaflet map to display as an eva field.
Changing the line in
eva-display-entity-view.tpl.php
from<?php print $rows; ?>
to<?php print render($rows); ?>
solves the problem. I will add this comment to the issue I opened previously, https://github.com/backdrop-contrib/eva/issues/3