test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • joomdude808 Friend
    #201279

    I am trying to use the following Joomla User Agent Detection Plugin…
    https://github.com/renekreijveld/UserAgentDetector

    My 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.php

    Is this the page I use to declare the script…
    templates/ja_argo/tpls/default-content-left.php

    Here 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 Moderator
    #549468

    Hi 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.

    joomdude808 Friend
    #549492

    I 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 Moderator
    #549502

    In 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

    joomdude808 Friend
    #549657

    The code needs to above the HEAD, so file should I use?

    Saguaros Moderator
    #549668

    You 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.

Viewing 6 posts - 1 through 6 (of 6 total)

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