Presentation I gave on Thursday 27th May 2010 demonstrating the mobile_tools module and Mobile theme as a way to create a 'mobile verion' of a drupal website.
20. In my presentation I went to a browser where I had Drupal 6 installed. I went through the process of enabling the Mobile Tools and Browscap modules, and the Mobile theme. I then demo'd the 'really simple' and 'simple' recipes from the previous slides. If you want to try it, download the modules and give it a go – it's really quite straightforward and self explanatory.
36. So in the demo, I quickly ran through how I overcame the 4 issues that I highlight in the previous slide. Homepage: Create a new homepage node, and in the settings.php file for your mobile domain, update the $conf variable $conf['site_frontpage'] = 'node/123'; Primary Links: Create a new menu specifically for your mobile website, and use the block for this menu to display only on your mobile theme Views: Create separate views for your mobile site and link to them in your mobile menus Content Types: Use node template files to control node displays in your mobile theme
39. So here in the demo, I just did some super basic code in a custom module: function yourTheme_init() { if($_SESSION['mobile-tools-site-type'] == 'mobile') { drupal_set_message('hello world'); } }