1 (edited by nakome 2012-09-22 14:29:43)

Topic: This is possible

This is possible ?

<?php if (Agent::isMobile()) { Template::get('mobile_index');} ?>

loading  this mobile_index.template.php and not this  index.template.php

nakome's Website

Re: This is possible

Line 58 - index.php

if (Agent::isMobile()) { 
    // Load mobile site template from 'mobile' theme folder
    require(MINIFY . DS . 'theme.' . 'mobile' . '.' . Site::template() . '.template.php');   
} else {
    // Load site template
    require(MINIFY . DS . 'theme.' . Site::theme() . '.' . Site::template() . '.template.php');   
}

Re: This is possible

Thanks master.

nakome's Website

Re: This is possible

i have a error in

Fatal error: main() [function.require]: Failed opening required '/home/public_html/tmp/minify/theme.mobile.minify.index.template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/index.php on line 77

I create another folder with another Monstra cms for mobile.

if (Agent::isMobile()) { 
          Request::redirect(Site::url().'mobile');
        } else {
            // Load site template
            require(MINIFY . DS . 'theme.' . Site::theme() . '.' . Site::template() . '.template.php');   
        } 

wink

nakome's Website

Re: This is possible

hm.. I will recheck this issue...