Results 1 to 4 of 4
  1. #1
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Disable side-boxes on mobile devices diy template

    Hello guys,

    Does anyone now how to display the left side-box only on the main page when viewing from a mobile or a tablet?

    I have installed the DIY responsive default template on my v1.5.1 and I need to turn all the side-boxes off for all other pages except the main page.


    Tried to test by adding this in the responsive_default.php

    if (in_array($current_page_base,explode(",",'contact_us')) ) {
    $flag_disable_right = false;
    $flag_disable_left = false;
    }

    and this into the responsive_mobile.php

    if (in_array($current_page_base,explode(",",'contact_us')) ) {
    $flag_disable_right = true;
    $flag_disable_left = true;
    }

    it disables the side-boxes for the contact us page on both desktop and mobile, It should heave disabled it only on the mobile version, something isn't working right.

    Thank You!

  2. #2
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Disable side-boxes on mobile devices diy template

    Not sure how it's made on responsive template... I think there are some stuff to control layout, but 2 things

    If you only want to hide it on certain device screen, you should use media query

    @media screen and (min-width: WHATEVER_WIDTHem) {

    // your css dont display

    }

    Or use the $detect->isMobile() (There are some example on the main_page responsive template )

    And also, there is a variable: $this_is_home_page that checks if you're on home page

    So

    if ($this_is_home_page) {

    }
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  3. #3
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Disable side-boxes on mobile devices diy template

    See support thread
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  4. #4
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Disable side-boxes on mobile devices diy template

    Quote Originally Posted by rbarbour View Post
    See support thread
    Hey, I read the support threat and answered, I tried to do what you said, but it only works on one page, can you please answer...

    10x

 

 

Similar Threads

  1. Mobile devices
    By Music Man in forum General Questions
    Replies: 8
    Last Post: 8 Apr 2015, 10:01 PM
  2. v153 Need help picking new template to better serve mobile devices
    By dinki in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Feb 2015, 09:46 PM
  3. Mobile Devices?
    By technologystorm in forum General Questions
    Replies: 6
    Last Post: 25 Apr 2007, 02:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR