How can I tell if the current request is for a backend or frontend page? This check will be done inside an observer, so I do have access to the request object if that helps
If you're able to use an observer, you can limit it to the 'adminhtml' event area.
... singleton mynamespace_mymodule/observer adminPrepareLayoutBefore