I am trying to convert some existing storymaps, and I'm using the converted posted here; https://www.arcgis.com/home/item.html?id=bc35e93d5d374e1a9c3583be0cc9f1d7#overview
This converter works, but it strips any html markup in text, and notably it strips story actions. I'm trying to add these back using the python API, but am not finding any example code that shows how. I think the correct approach is to add actions to a slide using the sidecar.add_action, then linking to that action somehow using an anchor.
Does there exist some example code that shows how to add story actions using the python api?
In the old storymaps, the actions links look like <a data-storymaps="MJ-ACTION-1510194574574" data-storymaps-type="media" href="#">Noosa catchment</a>. One example link is show in the "Noosa Catchment" page in this storymap: https://qgsp.maps.arcgis.com/apps/MapJournal/index.html?appid=309cfcd2d24f4dbb82241200134d08be
If we manually create a new storymap, and add actions to change an embedded map, I see in the json payload data for the storymap, that the actions are in the "actions" block directly beneath the storymap node, not under the sidecar, and it looks like
"actions": [
{
"origin": "n-IPPSV5",
"trigger": "InlineAction_Apply",
"target": "n-92JAf6",
"event": "WebMap_UpdateData",
"data": {
"actionId": "a-eu1786",
[...]
}
},
And the markup used to trigger the action (changing visible layers in an embedded map), looks like
<span data-action-type="text-style-action" id="a-eu1786">Noosa catchment</span>
In the old storymap, the action details are stored beneath the section node in a contentAction node, and the markup looks like:
<a data-storymaps="MJ-ACTION-1510555308265" data-storymaps-type="media"><span style="color: rgb(0, 255, 255);">geology of the Noosa catchment</span>
I can successfully retrieve this data, i just need to figure out how to add it to the new storymap, eg. should I just add such markup directly, after adding an appropriate action to the sidecar?