[fw-general] Re: Detect Mobile use Different View

2011-03-19 Thread is that you john wayne?
Hector, I fixed the problem a while back, i didnt use your suggestion as i'm not pulling out the view in the plugin. THis is predispatch and asa such the View doesnt seem to exist. TBH the more i think about this the more i'm preferring my solution anyway, as it's simple, doesnt require a whole

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-19 Thread Daniel Latter
You could also do this at server level no? In a .htaccess file you could detect and redirect to mobile subdomain, The subdomain folder on server would only contain a simple index.php file that bootstraps the app? Saves having to check every time, especially if you purely want to provide

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-19 Thread Daniel Latter
Ok, so you would still need to check at view script level with suggestion I made but there will be a way with suggestion I made to architect it in a way so the check is inherent within the app. On 19 Mar 2011, at 12:52, is that you john wayne? a...@mediabandit.co.uk wrote: Hector, I fixed

[fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread is that you john wayne?
ok, so i've solved the problem although i'm pretty sure this isnt an ideal solution: i manually check to see if the view is readable, if it is i change the view suffix to what i want it to be. this way i at least control which views are loaded so as to reduce the number of errors. $base =

[fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread is that you john wayne?
hey hector, thanks for this, nice idea. Sadly though, as i'm doing this here dispatchLoopStartup() the view isnt set nor is it even thought about. Maybe i'm doing this check in the wrong place? - ... or is it me? -- View this message in context:

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread Hector Virgen
If you bootstrapped the view, you can access it like this: $front = Zend_Controller_Front::getInstance(); $bootstrap = $front-getParam('bootstrap'); $view = $bootstrap-getResource('view'); If that returns null, then you can ask the ViewRenderer to initialize the view for you: $viewRenderer =

[fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread is that you john wayne?
This issue with that is i want to do this based on if the user has is viewing the site on a mobile device. It seems i'm unable to use bootstraping and Zend_Useragent/WURFL to achieve this, hence the need to use a plugin which made this all the more difficult. 8 hours to do something which i

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread Hector Virgen
Detecting a mobile device in the bootstrap seems way too early for me. I haven't used Zend_Useragent yet, but what I know about the bootstrap is that it's there to *prepare* your application for running. So it wouldn't make sense to me to detect mobile browsers during bootstrapping. A