0

Disclaimer: I've never used Joomla before logging in today and I haven't done any kind of web design in over a decade. I know software development, but these Joomla configs are definitely foreign to me right now.

I'm trying to help a school out by temporarily disabling their mobile view\site. I've looked for help on Joomla, but they either reference a mobile plugin or setting in the Global configs. I don't see anything mobile related in either of those.

Would love some direction here.

Thanks!

  • We really need more information than this, because it will be largely dependent on how the site is setup. First off, determine what template you are using as per Richards answer. From your comments it appears that the mobile site is being served a different url to the desktop version. Please clarify that in your post, because it was not obvious when reading it. Look at the plugins and extensions that are installed and determine what they are used for. Use extensions.joomla.org to help. It's time consuming, but I don't really see any other alternative based on the info you'veprovided. – TryHarder Aug 30 '17 at 4:19
1

If you want to keep things very simple, you can use a CSS media query to hide everything on the site to device below a certain viewport width.

If you're using Joomla's default Protostar template, then create a new file called user.css and add the following code to it:

@media (max-width: 767px) {
   html, * { display: none !important }
}

Once done, upload this CSS file to the following directory:

templates/protostar/css/

If you're using a different template, then it will most likely have a custom.css file associated with it instead. So you can add the above code to it.

Again, this is a basic solution. If you wish to actually detect a mobile device, you can either user Javascript or PHP.

  • Thanks for the reply, but I may need something a bit more remedial here. 1) So far I've only seen menus and configs\settings. I don't see where I can access directories and files. 2)We're already doing some level of device detection. Mobile traffic is being routed to a mobile site. We don't want to block mobile users. We just want to disable the mobile site from being viewed. Everyone should see the same site regardless of device or screen size. – MikeD Aug 29 '17 at 20:32
1

If you ftp into the site, your template code is going to be under the templates folder. You can find which specific template is being used by going in the admin to Extensions > Templates > Templates. There should be a subfolder with an appropriate name in the templates folder. This contains your template files.

If your site is responsive (ie the mobile version is generated using css media queries rather than redirecting to a completely different template), then you should be able to find and comment out any media queries in the css files. CSS files are likely to be under a css folder within this template.

Media queries look like @media (max-width: 800px).

You could alternatively add/override a viewport meta tag in the index.php file in order to to tell mobile devices to always display the site at the same width, which would be a quick fix if it is responsive.

If the site is adaptive (ie it loads a completely different template), then you may be best doing a case insensitive search for terms like "iphone" in the template files. If this finds nothing, go to Extensions > Plugins in the admin and see if there is a plugin doing the redirect. Unlike Wordpress, Joomla does not do mobile detection out-of-the-box, and so these are the most likely places you will find someone has added a script to add bespoke adaptive elements.

You can find if your site is responsive or adaptive by reducing your browser window. If a small desktop window shows the mobile version, it is responsive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.