Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Macro example for Multiple Querystring parameter check View modes: 
User avatar
Member
Member
mateus8 - 1/8/2013 10:38:17 PM
   
Macro example for Multiple Querystring parameter check
I seem to always run into this and never seem to get it quite right. I usually do some kind of work around but I was hoping someone could give me a hand.

I have a webpart that needs to be hidden when 1 of 3 other webparts are being displayed.

My other webparts are hidden until they are invoked with {%if (QueryString.searchdate == "") { "false" } else { "true" }|(default)%}

Thanks for you help!

User avatar
Kentico Support
Kentico Support
kentico_janh - 1/9/2013 12:27:13 AM
   
RE:Macro example for Multiple Querystring parameter check
Hello,

If I get it right, you need to show that web part only if at least one of those three querystrings are present. If so, then you were very close with your second example. Please use the following one instead:

{%
if (QueryString.GetValue("a")==null && QueryString.GetValue("b")==null && QueryString.GetValue("c")==null)
{return true;}
else {return false;}
%}


Where a b c are your querystrings (like searchdate).

Best regards,
Jan Hermann