This code has been updated - use the github link above to get the latest code.
Using the book Head First Mobile Web to learn and as a reference, I created a simple mobile interface for an existing eZ publish installation.
pagelayout.tpl includes three ‘pages’, content, search, and menu.
There are several supporting templates.
The site includes .mp3 files, so an HTML5 audio tag is included. The .mp3s are also offered as links for native device playback.
core.css is included to support the navigation. Any other CSS required for proper page display could be added.
I used eZ 4.7 (community edition equivalent), which includes auto device detection. This works extremely well.
Naming the mobile siteaccess and enabling autodetection in site.ini.
The manifest.appcache file is used to reduce bandwidth requirements and speed pages. In this case, the Home page, css, and jQuery are cached.
You will probably need to add or update a RewriteRule to ensure proper delivery of the manifest.appcache file:
It is a good idea to keep the mobile site out of search engines. This RewriteRule will allow you to deliver a different robots.txt file.
Excerpt from .htaccess