s-go Buzz
New Video Produced for RDTS » Wednesday, 25 July 2012 16:03
New Contract with Mystery Scene Magazine » Thursday, 19 July 2012 20:19
New CD Release Website for Samite » Thursday, 19 July 2012 20:15
s-go announces new secondary website backup service - BackupToo. » Tuesday, 17 January 2012 11:53
New Joomla 1.7 Site for Artist Samite Now Live! » Thursday, 05 January 2012 20:21
rss_icon twitter_icon facebook_icon
  • Web Design Portfolio
  • Why S-GO
    • Why S-GO
    • Process
    • News
    • the s-go Team
    • Detailed Quote
    • Pay for Services
  • Services
    • Joomla Web Design
    • Website Development
    • KICKSTART Website
    • SEO Strategy
    • Blog Development
    • Third Party Blogs
    • Social Media Strategy
  • Blog
  • Social Place

Mobile Navigation with Joomla!

ShareTweet

iPhoneSWLTThis is a followup post from an earlier article we wrote about creating an HTML5 Web App out of your Joomla site. Read that post by going here.

Getting your Joomla content into a mobile layout is something that by now you've more than likely figured out how to do. You know how to add in those meta tags to your site to tell Safari and Android Browsers not to allow any horizontal scrolling or zooming. But now you face another problem on the Joomla mobile frontier, mobile navigation with Joomla - dealing with navigation on your mobile device.

Mobile Navigation is a tough nut to crack. Unlike with desktop navigation that has great support for menu-based navigation, including (but not always recommended) "rollover" suckerfish type menus, the mobile experience has some limitations. Even though you can navigate these types of menus with your mobile device, you don't necessarily want too. It's simply not user friendly.

There are a few solutions out there for mobile navigation. When I was working on solving this problem for the Seneca Lake Wine Trail I looked a quite a few different systems, ultimately I decided to use S-GO's mobile template with some adapations. 

The Premise

Since a mobile app should look and feel like "an app" I decided to go with an icon-based homepage. This homepage would be set up with some nice navigation images to drive users into specific content areas. Since Joomla navigation is module driven, I needed to set up a mobile menu and then find a way to create my "icon based" navigation on the homepage, as well as a way to get to that navigation from content pages. All this, while remembering that the available realestate on a mobile device is considerably less than that of a desktop. 

The Solution

In a nutshell, here's the concept behind my solution. I set up a menu in Joomla just for the "mobile site". Even though the app would use all my existing Joomal content, I wanted to direct the user to very specific areas, so a specific mobile-only menu was appropriate. For the menu items I used Joomla's "menu image" paramater to insert the images into the HTML output. Then I created some CSS to lay things out the way I wanted.

On my homepage I needed to only display the icon menu to my users. That was easy enough. I modified the mobile template and added some PHP to see if I was on the homepage, and only publish the module position if that were the case:

PHP Code in Joomla Template:

<?php
$menu = & JSite::getMenu();
if ($menu->getActive() == $menu->getDefault()) :
?>
<div class="home-mobile">
<jdoc:include type="modules" name="mobile-home" />
</div>

That part is all pretty easy. I had a nice homepage with a gorgeous icon based navigation. Then I had to figure out what to do with the content pages. I couldn't just have this menu taking up my precious real estate, so I wanted to find a good way to hide it on content pages, but let users get to it quickly so they could visit other areas of the site. 

MooTools would be the answer to solve this problem. I only needed to put the menu in an 'accordion'. Since MooTools comes bundled with Joomla, it would be pretty easy for me to just start using it. I used the MooTools fx.accordion class to set this up:

MooTools / JS Code:

<script type="application/javascript">
window.addEvent('domready', function() {
var accordion = new Fx.Accordion($$('.toggler'),$$('.element'), {
opacity: 0,
display: -1,
alwaysHide: true,
onBackground: function(toggler) { toggler.setStyle('color', '#000'); }
});
});
</script>

This Mootools script does some pretty basic things. It looks for the HTML markup with a .toggler class, and sets it up as accordion. I added some parameters to the accordion to force the accordion to always load on the page as being closed. The "else" part of the PHP code above would be that toggler code, loading my menu as an accordion:

<div id="accordion">
<h3 class="toggler">Menu</h3>
<div class="element">
<jdoc:include type="modules" name="mobile-home" />
</div>
</div>

Now on my content pages, the menu would load in this accordion. This takes up very little real estate and let's my content be readily available to site users, but also keeps the usability focus to allow users to navigate to other areas of the site easily.

Screenshots (Visit Demo: http://www.senecalakewine.com)

mobile-blog-screenshots

More Code

I've posted the entire mobile template up on github. This includes all the code that I've showed above. You can download and install this template in Joomla.

Version Notice: This template is for Joomla 1.5.X - It's pretty easy to change up the templateDetails.xml file to make it an installable package on Joomla 2.5.X.


blog comments powered by Disqus
back to top

Latest Blog Posts

02.04.2013

Introducing Cohesive! A BRAND New Day.

So the time has come to introduce our new brand name, Cohesive! Yes, s-go Consulting is rebranding itself and the new name is Cohesive. We…
10.24.2012

Social Media and QR Codes Presentation

This presentation covers why social media is important to businesses and organizations in 2012. It also looks at what QR Codes are and how…
10.04.2012

Are You Protecting Your Facebook Friends?

How well do you protect your friends on your Facebook page? Click on a friend of yours and then click on their friends and then keep…
09.23.2012

How to Set-Up the NEW Twitter Profile Page

Twitter has just rolled out some new features which could completely change the “Look and Feel” of your Twitter Profile. You can quickly…
07.11.2012

Why s-go Consulting Uses Joomla!

s-go Consulting has utilized the Joomla Open Source Content Management System (CMS) as its primary platform since it was launched in 2005.…

Services

  • Joomla Web Design
  • SEO Strategy
  • Blog Development
  • Third Party Blogs
  • Social Media Strategy

More Services

  • Video Production
  • Joomla Templates from PSD
  • Joomla - Website - Blog Hosting
  • Digital Photography
  • Domain Names

communicate

  • Detailed Quote
  • Upload RFP
  • Newsletter Signup
  • Email Us
  • Call 607-330-2574
www.flickr.com

Copyright 2012 - s-go Consulting LLC,
a Delaware Limited Liability Company
Joomla!™ is a Trademark of Open Source Matters

  • Home
  • Privacy
  • Site Map
  • Contact Us