Change menu for mobile view?


It’s possible to testing if user is on mobile browser or not ? Because I want to change menu, and redirect user to new menu. By default, first level from menu is not clickable. I need only 2 entries from mobile menu.


This is my solution :

From this easy script :

Add lines in app_login, in function sc_validate_success and redirect user to new menu.

1 Like

Thanks, but sc_check_mobile is not in manual, why ?

Find also

source : Função para detectar Mobile - sc_check_mobile() - Formulários - Scriptcase

I didn’t use lately, maybe it has been removed or the manual is missing it, like a lot of other information

Finally, I added this code in menu app :

if (sc_check_mobile() == true) sc_redir('Menu-mobile');

and other code in menu-mobile app :

if (sc_check_mobile() == false) sc_redir('Menu');

It’s much better than my first solution.