passing static URL parameter to page include not working.

I must be doing something damn stupid here, but whatever I try I cannot get this to work.

I have a parent page which has a page include in it.

The XML snippet is here:

</template> <includepanel type="skuid" pagename="ViewEditAppraisal" module="" querystring="suppress_title=1&amp;amp;appid={{$Model.Appraisal.data.0.Id}}" lazyload="true"> <renderconditions logictype="and"/> </includepanel>

I am passing a URL parameter called “suppress_title” and giving it a 1.

This drives a Render condition on the included page (which works fine when I load the page directly in the browser), but refuses to work through the page include!! What am I doing wrong?

Here is the relevant bit of XML for the included page. Incidentally, the {{}} parameter passes and works fine, it’s on the static (hardcoded) one that doesn’t work.

<pagetitle model="VAppraisal"> <maintitle>{{Appraisee__r.Name}}</maintitle> <subtitle>Appraisal Summary: {{Name}}</subtitle> <actions/> <renderconditions logictype="and"> <rendercondition type="fieldvalue" operator="!=" fieldmodel="VAppraisal" sourcetype="param" nosourcerowbehavior="deactivate" sourceparam="suppress_title" value="1" enclosevalueinquotes="true"/> </renderconditions> </pagetitle>

Sorry if this is a dumb question, but for the life of me, I can’t get what should be a simple thing to work!

Any help gratefully appreciated.

Brad

Hey Bradley,

Just a thought, have you opened Chrome tools and verifying what is getting passed to the page include when the parameter is statically defined?

Irvin

Also, are any of the models named the same between the two pages? If so, that would certainly cause an issue.

No. I did have a little look about in the Dev Console but I couldn’t see hte URL in there anywhere… I think it’s all processed server-side…

I specifically checked for that and, no, all model names are unique across both pages.

In any event, I am passing a hard-coded variable, so don’t understand how the model things could even have an impact. 

Bradley,

Rob answered my similar question here: https://community.skuidify.com/skuid/topics/page-works-alone-but-blank-when-in-page-include

Apparently you can use the ‘newtork tab’ of your browsers developer tools to access the parameters being passed (as Irvin suggested).

my network tab doesn’t show it :frowning:

Thanks for jumping in here guys.  You are awesome. 

Unfortuantely the answer is not a good one.  The client side code that processes parameters in a page currently only looks at page parameters.  For example if you put a template on your include page and use the merge syntax {{$Param. suppress_title}} it will return blank.  This means that conditional rendering will not work in the way you are describing. 

You will have to come up with some other way to control the contents of your page include.   Sorry. 

when i inspect element on some item in the included page and then filter the network tab for my URL param, i get no matches… yet the include is rendering, but just not with parameter passed…

UPDATE: I found it… just needed to keep the network tab open as I clicked through my wizard…

hmmmm … is there a way to detect that the skuid page has been added to the window via a page include and not as it’s own page?

thanks Rob. But I’m not understanding your explanation of why this doesn’t work… I can create a new page, so no big deal, really, but I’d like to properly understand why this won’t work as desired… I’m not quite following your description… Cheers Brad

thanks Rob. But I’m not understanding your explanation of why this doesn’t work… I can create a new page, so no big deal, really, but I’d like to properly understand why this won’t work as desired… I’m not quite following your description… Cheers Brad

Ok here is more volume.  I"m not sure it will be more clarity. 

When you activate a page include,  the query string parameter is passed to Skuid’s server side processing for use in retrieving the correct data and passing it back to the window. 

However,  the parameter is not then exposed for use in the page.  If you open the browser console and type “skuid.page.params”   You will not see the parameters that were passed in the page include.  

On the client the only parameters that are recognized are the ones that came in the initial page load.  This means that the client side code that looks to parameters cannot see or use the ones you passed into your page include.  This includes Conditional Rendering. 

ok – got it – cheers.

Thanks. Let us know if you have other Skuid questions.