Using the Dynamic Partials example, we are able to use a variety of things to test if we should show a nag bar.
Here is a simple example: