draketherake,
ZF doesn't have subdomains, it hasURL/module/controller/action. your
iphone would seem to me to be a fake module.
so a regular route might be URL/admin/add/user, the iphone version would
be URL/iphone/admin/add/user.
These patch-ups re usually handled in a front controller plug in. You
would:
* Add the module *iphone *to your router in the bootstrap
* In the plug in predispatch hook you check to see if it is using
the iphone virtual module
* If it is, then set different default render template, and reset
the route i.e.
* URL/iphone/admin/add/user* becomes *URL/admin/add/user
* You might also set a flag so that other modules can be aware of
the iphone in the original call
* $iphone_call = true; (or false) then pop it in the registry.
Hope it works.
pat
draketherake wrote:
I want to have a regular version of my website and an iphone version at a
subdomain of iphone.domain.com. However, I don't want to maintain two
completely separate sites. What's the best way to keep separate views but
re-use all the controllers?
first method: have all views in the main directory with separate folders
"main" and "iphone". And have the .htaccess file in the iphone.domain.com
reroute to the main directory bootstrap file?
second method: have the iphone views inside the subdomain directory and
point my bootstrap file to the controllers in the main directory.
please help!