This documentation is for version 1 & 2 of Mobile Web OSP.
Version 1 Templates
The Touch templates in version 2 of Mobile Web OSP are based on the 'ip' templates from version 1.
Devices Supported
The following devices are supported by the Touch theme and templates:
- iPhone OS 2 and less
- webOS
- Opera Mini
The above devices don't appear to support all the necessary features to run the more advanced WebKit templates but I didn't want to limit them to just the Basic theme and templates since I know they're capable of more.
Style Examples
The following are examples (non-exhaustive and will include images eventually, sorry) of the styles that are available by default in the Touch theme:
div.focal
div.nonfocal
ul.nav
ul.secondary
ul.results
a.arrow
a.phone
a.email
a.map
a.calendar
a.youtube
a.people
a.external
a.pdf
p.smallprint
Functional Reference
The following are examples of functions that you can use in Touch templates and what they do:
$page->title("text");
sets the title tag in the base template to the included text
$page->navbar_image("image");
sets the image that should be shown for that section in the navbar. Leave off the extension! Images need to be stored in '/themes/[theme_name]/touch/images/'
$page->add_stylesheet("/path/");
ability to add a section specific stylesheet.
$page->not_scalable();
modifies the viewport meta tag and sets user-scalable to true by default. if this tag is added it will set it to false.
$page->fixed();
modifies the viewport meta tag and sets the initial-scale and maximum-scale properties to 1.0 if set.
$page->extra_onload("javascript");
adds the included JavaScript code to the onload attribute of the body tag.
$page->onorientationchange("javascript");
adds the included JavaScript code to the onorientationchange attribute of the body tag.
$page->add_inline_script("javascript");
adds the included JavaScript code to the head section of the page.
$page->breadcrumbs("text"[,"morebreadcrumbs"]);
sets the breadcrumb text trail. if there is only one option the link will automatically be set to history.back(). If there is more than one option you will also need to set the $page->breadcrumbs_links() function where the base option is not included.
$page->breadcrumb_home();
if set will ignore $page->breadcrumb_links() and only use the first option from $page->breadcrumbs.
$page->breadcrumb_links("/path/");
provides the links that should be linked to for extra links in the $page->breadcrumbs() function.
$page->content_begin();
starts the content for the page
$page->content_end();
ends the content for a page.
$page->help_off();
turns off the link for help if you know you haven't set-up a help file for the module.
Comments (0)
You don't have permission to comment on this page.