contao-community-alliance / merger2

The Merger² for Contao.
GNU Lesser General Public License v3.0
8 stars 5 forks source link

Feature Request: Erkennen, ob „Mobile“ Switch aktiv #12

Closed Jugibur closed 6 years ago

Jugibur commented 10 years ago

Wäre es möglich, eine Abfrage zu integrieren, ob gerade das mobile Switch aktiv ist oder nicht? Damit könnte man sich u.U. auch ein ganzen mobiles Layout sparen. Danke noch für diese tolle Erweiterung!

dmolineus commented 6 years ago

There will be an isMobile function in the next release which detects renders the page in the mobile view. If you only want to check if the mobile switch cookie is set, you might add true as parameter isMobile(true). Otherwise the user agent might enable the mobile view as well if a mobile layout exist (same as Contao works).