Difference between revisions of "Widget:RAPID-Transclude"

From Open Energy Information

(test)
(remove console log from test)
Line 7: Line 7:
 
<script>
 
<script>
 
if(location.href.includes('action=formedit')===false){
 
if(location.href.includes('action=formedit')===false){
console.log('transcluding...');
 
 
//url based variables
 
//url based variables
 
var techMapper=location.pathname.split("/")[3];
 
var techMapper=location.pathname.split("/")[3];

Revision as of 10:49, 24 April 2018

This template performs an ajax request for RAPID Tech/Jurisdiction/Topic pages, based on their related Roadmap Overview page. It is called by [[:Template:RAPID-Overview(Tech-Jurisdiction-Topic). See RAPID/Geothermal/California/Land Use as an example.

The template "transcludes" information from the right column, the overview and the narrative from pages like RAPID/Roadmap/3 and imports it to the page using the above template (such as RAPID/Geothermal/California/Land Use). It also removes any links/buttons that are not related to the current page's jurisdiction.