kentico_zdenekc
-
3/29/2011 8:37:59 AM
RE:Programatically decide inherited levels
Hi,
Thanks for sharing your solution here.
Actually an alternative solution to javascript, at least for hiding the elements, would be to encapsulate those parts into Webpart zones and use querystring macro expressions for zone visibility property.
To be more specific, you would have let's say a header, footer and sidebars webpart zone(s). The main content zone with page placeholder (for child page) will be separated. Then, if you set the "Visible" property of those 3 webpart zones (you will need to open the zone properties dialog and click the small black arrow next to the "Visible" attribute checkbox to enter the macro) like:
{%hideMasterPage != "1"%}
Then, when "?hideMasterPage=1" is present in the URL, those webpart zones won't be displayed. It is probably better than using javascript, because the content is not even rendered, and if there were many webparts in header, footer and sidebar zones, it may give some performance spare. That's because when the zone is hidden, none of the webparts is resolved and the processing ends in the beginning.
Hope this will be useful for your aim.
Regards, Zdenek
|