-
☆ A M B ☆
- 2,475 Posts
You’ve probably seen this scenario before:
somedomain.mobi
and
somedomain.com
Both carry the same content, but the .mobi version uses streamlined templates and minimal content so it’s more easily navigable via a mobile device.
The question is... how do I pull that off using MODx? My thought was to have a TV so that I can specify 2 templates for any page: one is the regular template (for the .com site), the other template would be for the .mobi site. I think I can do something in the .htaccess or write a plugin (or a combination of both) that causes any requests for .mobi pages to use the special template. I think I can point 2 domains to the same home directory, and then my plugin could see which domain was being requested via $_SERVER[’HTTP_HOST’].
Is this the best way to do this? Or can you guys recommend something else?
-
☆ A M B ☆
- 2,475 Posts
Man, I think it’d be a nightmare to have to support 2 separate installs... both for the client and for the developer (me). The whole idea is that we don’t want to have to duplicate content... we just want to have 2 "views" dictated by the domain name. We don’t want a separate doc tree or separate content... too much work.
Certainly, two installs could reference the same database... I’d probably delete the manager on one of those sites... but then there’s the same problem of how to tell the one site to use a different set of templates...
*still scratching head*
-
☆ A M B ☆
- 2,475 Posts
My worries with the CSS solution is that the page and all of its bloated content would still load... just certain elements would be hidden or formatted differently. That’s the easiest solution, for sure, but I don’t think it’s the most thorough. I’m a bit behind with my CSS knowledge, though... is it possible some of these style declarations somehow prevent the entire page from loading?
-
☆ A M B ☆
- 2,475 Posts
Thanks! Yeah, those look like very relevant threads. I think this is gonna happen in Revo... so I might get extra mileage out of the view-level filters...