Blog Sections Open
Showing Multiple Resource Markers on a Yandex Map with ddYMap
A practical map-output pattern for Evolution CMS projects that need one marker per resource instead of one hard-coded location.
Map integrations become much more useful once every resource can supply its own marker. In classic Evolution CMS projects, ddYMap plus Ditto was a flexible way to build that from ordinary documents and a location TV.
Basic pattern
[[ddYMap?
&geoPos=`[[Ditto?
&tpl=`mapRow`
&tplLast=`mapRowLast`
&noResults=``
]]`
]]
The row template outputs one marker definition:
{latLng: [[+location+]], content: '<h1>[+pagetitle+]</h1>'},
Why this works well
The map layer stays generic while the resource list provides the marker data. That means editors can manage locations through ordinary documents instead of touching the map code directly.
What to watch for
- Coordinate formatting must stay consistent.
- The last row often needs a separate template to avoid a trailing comma.
- Popup HTML should stay small and sanitized.
For older Evo builds, this is still a solid example of using content structures to drive frontend behavior cleanly.
Showing the Source Page for Latest JotX Comments
How to make a JotX latest-comments block point back to the page where each comment was posted instead of showing comment text without context.
Preprocessing TV Values Before Saving a Resource
How to modify or normalize TV values before an Evolution CMS resource is saved, instead of cleaning them up later in templates.