Permalink
Browse files

Update README again to reflect module doc changes.

  • Loading branch information...
1 parent fccaab2 commit c30b01d2941869ce4e2c0f0f8c8355275905fce3 @bigpresh bigpresh committed Dec 9, 2010
Showing with 24 additions and 0 deletions.
  1. +24 −0 README
View
24 README
@@ -18,6 +18,30 @@ DESCRIPTION
A plugin for Dancer-powered webapps to easily detect mobile clients and
offer a simplified layout, and/or act in different ways.
+ The plugin offers a `is_mobile_device' keyword, which returns true if
+ the device is recognised as a mobile device.
+
+ It can also automatically change the layout used to render views for
+ mobile clients.
+
+Custom layout for mobile devices
+ This plugin can use a custom layout for recognised mobile devices,
+ allowing you to present a simplified page template for mobile devices.
+ To enable this, use the `mobile_layout' setting for this plugin - for
+ instance, add the following to your config file:
+
+ plugins:
+ mobiledevice:
+ mobile_layout: 'mobile'
+
+ This means that, when `template' is called to render a view, if the
+ client is recognised as a mobile device, the layout named `mobile' will
+ be used, rather than whatever the current `layout' setting is.
+
+ You can of course still override this layout by supplying a layout
+ option to the `template' call in the usual way (see the Dancer
+ documentation for how to do this).
+
AUTHOR
Alexis Sukrieh, `<sukria at sukria.net>'

0 comments on commit c30b01d

Please sign in to comment.