Dynamically Switch Theme – Server Side

Hi all you WP experts. Hope you can help me work something out.

I have a client project that requires their WP site to automatically load the correct theme / CSS based on how the content is loaded.

They have a monthly auction and have a long list of items available for their regular buyers to view. They keep this one one long list to make it easy for their non-techie customers to print out or save as one PDF.

They allow a few ‘reseller’ sites to embed this content in an iframe on their sites. The iframe is typically about 700 pixels wide so it fits all the content no probs. However, we’d like to make the content show with sidebars etc., on the master site and add a nice header etc.,

So what I need to come up with, is a solution that can enable the theme and CSS to be loaded correctly on the server side so when the content is viewed directly it shows up all pretty with a 960px wide theme with nice header, sidebars etc., but if it is embedded in the 700px wide iframe it only loads the minimalist version of the theme and CSS.

We want to avoid JavaScript if we can and do as much as possible server side (instructions from the top dude at the client’s company).

Here’s my rough idea:

– Basically, we need an automatic / dynamic theme switch to work like:

— if (loaded in iframe == yes) {

— load minimalist theme and CSS

— }

— else {

— load the default theme with header, sidebars, etc

— }

— done.

Sounds logical..! But will it work?

Obviously this needs to work “on the fly” as there could be several people viewing the content simultaneously – some directly and some in an iFrame.

Am I hoping for too much or does anyone have any ideas?