Determine where the included page came from

I have a page include that is called from 3 pages. When the included page is executed on of 3 models wins.

Each models has UI field to determine if this model was used.



I am trying to create a template that is conditioned on the 3 fields in the parent model

Something like this where Engage_CR is parent model



I would add a URL parameter and send this into the page include.  Something like ‘pagefrom=page1’.  Just make the ‘page1’ different for each page where you open the page include.  You can then use this parameter in your page include to handle conditional rendering.



Do I reference the Page1 in the included as {{Page1}} ?  Is this where I reference it:  {{#{{$Model.Engage_CR.From_Object}}}} and what would it look like?


When you open the page include, send this string ‘into’ the include.


When you want to reference the page parameter, use the following:




I thought I had it right?
This is the query string:

I then use the parm in 2 places.

The first is a template field which i put {{$Param.ViewCR}} in the field

The query shows no data

I also set up a UI-Only field

That also is blank

Cant figure it out??


It looks like I took you down the wrong path.  See the comments here about page includes not being able to show page parameters.  This approach won’t work for your case.

Maybe you can modify your ModelUI field to check the length of the model. 
I think you were saying that only 1 of the 3 models will have any data so it’s length will be >0.




Another option would be to set up a ui-only text field in your include page with a url param condition on it to store the pagefrom param. Then you can reference that field instead of referencing the param.

Hello Matt,

I thought this would work but must have something wrong. I passed the following:

Like this:

Or like this?

My formula must be wrong. Any suggestions?

Matt and Bill McCullough:  Thanks for working with Bill Fox on this problem.   The fact that URL parameters sent to page includes are not included in the Javscript API for use inside the page include is going to make your ideas problematic. 

Bill Fox:  I think we should go back to the beginning and review your merge syntax.  Your problem is there. 

A few pointers.  
1. The conditional block takes both the conditional symbol (#) and the global merge syntaxt ($).  They need to both be inside a single set of curly braces.

2. Your global merge syntax does not have the full syntax.  It needs “data.0” to be included between the model name and the field name. 

3.  Four braces is going to mess things up good. 

So things should look like this: 


Note:  I’m not confident in the merge syntax for the field value you are trying to display.  But I have not changed it. 


If I create a ui-only text field on an included page, and create a url/param condition on it’s model to point that field to the param passed in the query string, shouldn’t the ui-only field get that value?

That worked.  Thanks.

You are welcome Bill.  Thanks for your patience.