I'm writing online documentation for a site that has substantial left-side nav in a sidebar: http://www.xowave.com/. We want to be able to hide the sidebar, perhaps to build a smaller tarball of the docs, or to make more room for large images on smaller screens, or to save space on crowded pages.

Bjorn (the developer) made the sidebar conditional a few days ago, and I just enhanced it this morning to provide a user-accessible knob (in footer.incl , so on available on every normal page) to flip it on and off. Additionally, with "wget --user-agent=printme", we can whack the whole site without nav. I don't actually want to do this, but it's a nice feature.

I actually tested with something like "curl --user-agent printme URL | grep -i agent", using the URL of a special test.shtml page that basically just contained <!--#printenv -->. It was very handy for figuring out what the server thought of my requests.

footer.incl contains this snippet:

<!--#if expr="$QUERY_STRING = printme" -->
    <a href="<!--#echo var="SCRIPT_URI" -->">Restore navigation sidebar</a>
<!--#else -->
    <a href="<!--#echo var="SCRIPT_URI" -->?printme">Hide navigation sidebar</a>
<!--#endif -->

And head.incl wraps the sidebar code in:

<!--#if expr="$sidebar = hidden || $QUERY_STRING = printme || $HTTP_USER_AGENT = printme"-->