Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I'm trying to clone a map and it's associated views.
Usually I will go to
$items['admin/structure/openlayers/maps/list/%ctools_export_ui/clone']
and try to find code in this kind of page callback. But in this case, I can't find it anywhere. I suppose it has used ctools' feature to build this menu item in openlayers_maps_ui.class.php?
So, get back to the question, how can I clone a map in code just as what page $items['admin/structure/openlayers/maps/list/%ctools_export_ui/clone']
has done? Or where can I find the page callback for this clone page? Thanks in advance!
Comments
Comment #1
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedHave a look at lines 780-819 of openlayers.module to find the relevant functions. the map's machine name is the unique key, so as long as you change that value it will be saved as a new map.
Comment #2
smiletrl CreditAttribution: smiletrl commentedThanks!