We use a number of Page Includes in pop ups, and prefer to have one common page for all pop ups of a given type. Querying models with URL parameters was half of the battle, we also needed access to that value elsewhere. I figured out a workaround for the time being.
1) Create a new model on the parent page, and add a UI only text field (called ‘value’). We happened to have a ‘Setup’ model already defined on our master page, so I used it.
2) Create a new model + UI Only text field (also called ‘value’) on the child page include.
3) Create a new Inline javascript snippet on the child page. It is important that it’s inline as it needs to happen on page load. Enter the following code:
The model names and variable names can be anything, so long as they’re appropriately updated in the snippet. Also, I assume the interested data is in the first row of each model.
(function(skuid){ var $ = skuid.$;<br />$(document.body).one('pageload',function(){<br /> //get the two models<br />var ParentModel = skuid.model.getModel('ParentModel');<br />var ChildModel = skuid.model.getModel('ChildModel');<br />//get the first row of each model<br />var ParentModel_Row = ParentModel.getFirstRow();<br />var ChildModel_Row = ChildModel.getFirstRow();<br /><br /> //Set the inherted value<br />ChildModel.updateRow(ChildModel_Row, {value : Setup.getFieldValue(ParentModel_Row, 'value')});<br />});<br />})(skuid);
The model names and variable names can be anything, so long as they’re appropriately updated in the snippet. Also, I assume the interested data is in the first row of each model.