Create sub-module for makeing $is_mobile and $is_tablet available to templates.

Comments

mpdonadio’s picture

Status: Active » Needs review

A first pass at this has been comitted. Will show up in 7.x-1.x-dev soon.

Right now, the 'html', 'node', 'page', 'region', and 'zone' hooks will have $variables['is_mobile'] and $variables['is_tablet'] available. I don't see a need to make these available to other hooks.

As with the rest of the project, no attempt is made (and likely will never be made) to account for persisting detection and solve caching complications due to device detection. That is best handled by the end user and needs to be customized for their environment.

mpdonadio’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.