Thursday, August 5, 2010

IsDlg Query parameter

With the new design of SharePoint 2010 we have more context aware UI navigation.
We have now popup for pages which shows only the main content of the page.

In case you need to write a new ASPX which you want to display as popup, which master to inherit ??

Answer is simple - same default.master , actually SP2010 Design allows you to hide left navigation and top bar just by adding Query parameter



Assuming you have a custom Div
<div id='customDiv' class='s4-notdlg'> Hello </div>

You can use JQuery to do the adjustments.

<script type="text/javascript">

function querySt(ji) {

hu =;
gy = hu.split("&");

for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");

if (ft[0] == ji) {
return ft[1];

var IsDlg = query("IsDlg");

$(document).ready( function() {



Also one more thing. In case of custom development, if you have some html you want to hide when it is rendered as popup. Apply following css to the div element wrapping your html


Try for yourself

Nice to have:
Infact if client have a page with too much content and client want to focus on data by hiding left nav/top bar , you can quickly add a javascript function to give him Toggle functionality for the chrome.

Reading Query String