-
AuthorPosts
-
September 12, 2014 at 5:35 pm #201279
I am trying to use the following Joomla User Agent Detection Plugin…
https://github.com/renekreijveld/UserAgentDetectorMy goal is to NOT render the Sidebar 1 & 2 on all phones. The developer gave me the code & instructions, but I am unclear as how to implement (where to place code).
Is this the file I use to wrap the Sidebars with the developers code…
templates/ja_argo/tpls/blocks/mainbody-content-left.phpIs this the page I use to declare the script…
templates/ja_argo/tpls/default-content-left.phpHere is the code provided by the developer…
<?php if($ualyout != ‘mobile’) { ?>
sidebar code here
<?php } ?>With your template code in the PHP part above the head…
<?php
$session = JFactory::getSession();
$ualayout = $session->get(‘ualayout’);
?>Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 15, 2014 at 3:22 am #549468Hi joomdude808,
JA Argo is responsive template, which means that it will automatically adapt to any screen resolution (tablet, mobile, etc…). Thought that it’s no need to use this agent detection.
And with this template, you can easily hide any part in mobile view port by using some css rule for mobile view only.
You can post your site’s URL here and tell me the part you don’t want to show in mobile, I will suggest you further.
September 15, 2014 at 5:27 am #549492I am referring to the Sidebar. Bootstrap merely hides it, I do not want it rendered for mobile devices.
Please tell me which files and where I need to add the previously provided code…Thank You
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 15, 2014 at 6:55 am #549502In order to hide the sidebar in mobile devices, you can simply create a new css file called custom.css in this path: /root/templates/ja_argo(your_default_template)/css/ and add this css rule:
.t3-sidebar {
display: none;
}
In case that you still want to add above code from you can add it into head block of template: templatesja_argotplsblockshead.php
September 16, 2014 at 6:40 am #549657The code needs to above the HEAD, so file should I use?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 16, 2014 at 7:19 am #549668You can go to this directory: templatesja_argotpls
And based on the layout you’re using (by default, we provide 2 available layouts: default and default-content-left), you open associated PHP file (default.php , default-content-left.php). In each file, you will see <head> tag there and add your desired code to suit your need.
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Saguaros 10 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum