Page requirements¶
The script
element with attribute data-drupal-selector='drupal-settings-json'
Explanation¶
Inside the script
element, the JSON must contain the key currentPath
. The value from the node is used to create the URL of the CMS as shown in the following script:
<script type="application/json" data-drupal-selector="drupal-settings-json"> {"path":{"baseUrl":"\/","pathPrefix":"nl\/","currentPath":"node\/1",...}} </script>
CMS settings¶
base_url
of the CMS
Generated URL¶
#{base_url}/node/#{extracted_node_from_script_current_path}/edit
Example¶
The domain https://www.rennie.be has a base_url
, which is the CMS URL: https://prods896urp7.main.acsf.baywsf.com.
Each page contains a specific "currentPath":"node\/#{number}"
on the script drupal-settings-json
.
For example, the https://www.rennie.be/nl/ page has "currentPath":"node\/416"
, which means that the URL for this specific page is https://prods896urp7.main.acsf.baywsf.com/node/416/edit.