Can anyone tell me if there is something wrong with this code? The idea is that if there is a mobile device detected it will switch to a different page template. The problem is that the result is a blank page (apparently an Error 404 page from what Chrome is returning). The templates mobile.php and standard.php do work because I tested them, which brings me to believe that there is something wrong with this code.
<?php
/**
* @author Christian Schuelling
* @package Joomla!
* @subpackage Was Wenns Regnet
* @link http://whykiki.de
* @email info@whykiki.de
* @copyright Christian Schuelling
*
* Was Wenns Regnet
* Copyright (C) 2012 Christian Schuelling
*
**/
defined( '_JEXEC' ) or die( 'Restricted access' );
////////////////////////////////////////////////////////// hier kommt lädt man allen relevanten Stuff, den man braucht, der aber keine Ausgabe macht.
// Gib mir den Menü Kram
$itemid = JRequest::getVar('Itemid');
$menu = &JSite::getMenu();
$active = $menu->getItem($itemid);
$params = $menu->getParams( $active->id );
$pageclass = $params->get( 'pageclass_sfx' );
include 'Mobile_Detect.php';
$detect = new Mobile_Detect();
if ($detect->isMobile()):
require_once("mobile.php");
else:
require_once("standard.php");
endif;
?>