O'Reilly logo

Elgg 1.8 Social Networking by Cash Costello

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a mobile theme

We close the chapter with a short guide to creating a mobile theme. Elgg's view system makes it easy to create a theme for mobile devices. A mobile theme creates another viewtype that is used whenever a mobile browser is detected. In Chapter 7, we discussed how Elgg uses a default viewtype to serve web pages to a browser and an rss viewtype to serve RSS feeds to a feed aggregator. The logic and data are the same for different viewtypes, but the rendered output is different. For a mobile theme, we create a mobile viewtype and switch to this viewtype whenever a mobile browser is detected.

Plugin structure

Our mobile theme is structured like the preceding theme except that instead of putting the views in views/default/, they ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required