Search
Other Conditional Content questions
Forum

Can you add the function show-hide on Webview?

Federico Dantoni's Avatar Federico Dantoni
Now-a-days we are making apps out of our Joomla sites, using the webview function, there are even plugins and sites that they convert your joomla site into a Webview app with the click of a button, like WebViewGold on CodeCanyon. It would be great to have the option to show or hide content on webview.

The hide-show from mobile and tablets is ok, but sometimes is necessary to show content in mobile and tablets but just hide it from the app itself.

Like for example if you have a subscription button, you can't have a subscription button on iOS or Android, unless you do it through them, which is very complicated and expensive. Many sites such as Netflix solves that by having you to manage your account from the browser, instead of within the app.

The webview function will solve that by just hiding those links and buttons when the site is being viewed from Webview. And then you can show a link only on Webview which will open a new window in the browser. Since Conditional Content is already setup for things like that, I think it would be a great addition to the plugin.

What do you think?

Thank you,
Peter van Westen's Avatar Peter van Westen ADMIN
You can try this in the PHP condition:
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) || (strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile/') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Safari/') == false);
Please post a rating at the Joomla! Extensions Directory
Federico Dantoni's Avatar Federico Dantoni
Never mind, I think the best way to save all headaches is making a PWA instead of a Native app. In that way I won't need to hide anything.

Thank you Peter,
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription