DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Mobile Helper

Author:Christopher
Created:2010-12-18T19:57:23
Changed by:Philipp Müller
Changed:2014-04-09T13:55:09
Classification:lvmobile
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) ----
Keywords:forAdmins, forDevelopers, forAdvanced
Author:Documentation Team
Email:documentation@typo3.org
Language:en

img-1 img-2 EXT: Mobile Helper

Extension Key: lvmobile

Language: en

Version: 1.0.1

Keywords: forAdmins, forDevelopers, forAdvanced

Copyright 2013, Philipp Mueller, <philipp.mueller@lavitto.ch>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

`EXT: Mobile Helper 1 <#__RefHeading__5708_1738894311>`_

`Introduction 3 <#__RefHeading__5710_1738894311>`_

What does it do? 3

`Administration 4 <#__RefHeading__31511_818911409>`_

TypoScript-Functions 4

Extension Configuration 4

`Examples 5 <#__RefHeading__1040_1937077595>`_

Debug 5

View-selector 5

`Others 6 <#__RefHeading__794_1937077595>`_

Known problems 6

To-Do list 6

ChangeLog 6

Introduction

What does it do?

Provides TypoScript-Functions to check if the website is called by a mobile device. Additionally allow to force the desktop- or mobile- view.

Administration

TypoScript-Functions

  • user_lvmobile_isMobile returns 1 if a mobile device calls the page or the “forceMobileVar”-GET-Var is set to 1returns 0 if no mobile device calls the page or the “forceNoMobileVar”-GET-Var is set to 1
  • user_lvmobile_isMobileForced returns 1 if the “forceMobileVar”-GET-Var is set to 1
  • user_lvmobile_isNoMobileForced returns 1 if the “forceNoMobileVar”-GET-Var is set to 1

Extension Configuration

forceMobileVar

Property

forceMobileVar

Data type

text

Description

The name of the GET-var, which used to force isMobile = 1

Default

forceMobile

forceNoMobileVar

Property

forceNoMobileVar

Data type

text

Description

The name of the GET-var, which used to force isMobile = 0

Default

noMobile

Examples

Debug

page.55 = COA
page.55 {
  10 = TEXT
  10.value = no
  10.noTrimWrap = |user_lvmobile_isMobile: |<br>|

  20 = TEXT
  20.value = no
  20.noTrimWrap = |user_lvmobile_isMobileForced: |<br>|

  30 = TEXT
  30.value = no
  30.noTrimWrap = |user_lvmobile_isNoMobileForced: |<br>|

  wrap = <hr>|<hr>
}

[userFunc = user_lvmobile_isMobile]
page.55.10.value = yes
[end]

[userFunc = user_lvmobile_isMobileForced]
page.55.20.value = yes
[end]

[userFunc = user_lvmobile_isNoMobileForced]
page.55.30.value = yes
[end]

View-selector

Show a view-selector for mobile devices. So they can load the desktop- version by a link at the end of the page. This configuration shows the selector too, if the desktop-version is forced by a mobile device (to go back to the mobile version).

// do not forget to configure the linkvar-settings!
// use every link-var only one time in the url
config.uniqueLinkVars = 1

// keep the vars noMobile and forceMobile
config.linkVars =  noMobile, forceMobile

[userFunc = user_lvmobile_isMobile]||[userFunc = user_lvmobile_isNoMobileForced]
page.200 = COA
page.200 {
  10 = TEXT
  10.value = View:
  10.noTrimWrap = || |

  20 = TEXT
  20.value = Mobile
  20.typolink.parameter.data = TSFE:id
  20.typolink.additionalParams = &noMobile=0&forceMobile=1

  25 = TEXT
  25.value = |
  25.noTrimWrap = | | |

  30 = TEXT
  30.value = Desktop
  30.typolink.parameter.data = TSFE:id
  30.typolink.additionalParams = &noMobile=1&forceMobile=0

  wrap = <div class="view_link"> | </div>
}
[end]

Others

Known problems

Nothing. Feel free to report bugs on http://forge.typo3.org/projects /extension-lvmobile

To-Do list

Nothing. Feel free to add feature requests on http://forge.typo3.org/projects/extension-lvmobile

ChangeLog

See EXT:lvmobile/ChangeLog.txt