Announcement

Collapse
No announcement yet.

Links For Mobil Side Only

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Links For Mobil Side Only

    I am trying to add links on "Prod" page and mobil side only for suvaint theme.

    I have found this
    <mvt:if expr="('android' CIN s.http_user_agent OR 'iphone' CIN s.http_user_agent OR 'ipod' CIN s.http_user_agent OR 'webOS' CIN s.http_user_agent OR 'iemobile' CIN s.http_user_agent OR 'blackberry' CIN s.http_user_agent) AND NOT('tablet' CIN s.http_user_agent OR 'GT-P1000' CIN s.http_user_agent OR 'SCH-I800' CIN s.http_user_agent OR 'is_tablet' CIN s.http_user_agent OR 'is_tablet' CIN s.http_user_agent)">

    yada, yada, yada

    <mvt:else>

    more yada yada yada

    </mvt:if>

    It doesn't seem to help or work correctly

    #2
    Re: Links For Mobil Side Only

    Anyone?

    Comment


      #3
      Re: Links For Mobil Side Only

      I'm not sure how the combination of the expression you are using and a responsive web design will work. Hopefully someone with a bit more understanding of the expression and the Suivant ReadyTheme will chime in.
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Re: Links For Mobil Side Only

        Condition is working fine. I just checked it with an Android device and PC. From which device/browser you are trying to test it?
        Rajnish Sinha
        ---------------------
        https://twitter.com/rajnishsi

        Comment


          #5
          Re: Links For Mobil Side Only

          That's code is kind of a 'old school' way of doing 'device switching'. Suivant uses a 'responsive' methodology where things are controlled based on device size and NOT device type.

          This is done by using "css media rules" like the folllowing:

          @media only screen and (min-width: 480px) {
          /* Insert CSS Here */
          }

          @media only screen and (min-width: 640px) {
          /* Insert CSS Here */
          }

          @media only screen and (min-width: 768px) {
          /* Insert CSS Here */
          }

          @media only screen and (min-width: 960px) {
          /* Insert CSS Here */
          }

          @media only screen and (min-width: 1170px) {
          /* Insert CSS Here */
          }


          So, one way would be to set apply a style to the non-mobile link like:

          <a href="small-devices-please-dont-go-here.html" class="noMobileShow">Hide Me</a>


          and then use this css rule in the appropriate media selector such as:

          @media only screen and (min-width: 960px) {

          a.noMobileShow { display:none }

          }


          There are pros and cons to using media rules verses device selectors, but I'd think its more important to remain consistent.
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            Re: Links For Mobil Side Only

            I was coding a menu to Hide under all pages except for product. <-This is working

            But I also want it to display all the time in Mobil mode <- This doesn't seem to work properly

            Comment


              #7
              Re: Links For Mobil Side Only

              If you are just looking for a solution to hide/display items depending upon device, media queries in CSS are much better way to do the job. Bruce explained them above in good detail, you'll just need to adjust them a little according to particular context.
              Rajnish Sinha
              ---------------------
              https://twitter.com/rajnishsi

              Comment

              Working...
              X