<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Detect mobile device on hubl coding? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/408646#M21121</link>
    <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2021 00:44:54 GMT</pubDate>
    <dc:creator>georgemarket8</dc:creator>
    <dc:date>2021-02-12T00:44:54Z</dc:date>
    <item>
      <title>How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/375605#M18909</link>
      <description>&lt;P&gt;{{request.headers['user-agent']}} this variable showing so much information.Can any one help me on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 09:28:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/375605#M18909</guid>
      <dc:creator>prasadcolumbus</dc:creator>
      <dc:date>2020-10-01T09:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/375762#M18914</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/103285"&gt;@prasadcolumbus&lt;/a&gt;&amp;nbsp;I recommend either using &lt;A href="https://knowledge.hubspot.com/cos-general/get-started-with-smart-content" target="_blank" rel="noopener"&gt;Smart Content&lt;/A&gt; if you need to figure this out server side. Otherwise, you can do this client side fairly easily with either CSS media queries to show/hide specific things on mobile or desktop or use JS Match Media to change interaction of things on mobile/desktop.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 18:45:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/375762#M18914</guid>
      <dc:creator>stefen</dc:creator>
      <dc:date>2020-10-01T18:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/376035#M18925</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/103285"&gt;@prasadcolumbus&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thats expression really shouldn't return a value that's very large at all, ~120-150 characters with spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look at &lt;A href="http://Mozilla/5.0%20(Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36" target="_self"&gt;this resource&lt;/A&gt; regarding the possible values it can return.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if you could do somehting like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set agent = request.headers['user-agent']|lower|split(" ") %}

{% set isMobile = agent.index("mobile") &amp;gt; -1  ? true : false %}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously this will need more research as I'm not familiar enought with the user agents to know if it alwyas contains " mobile".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 15:34:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/376035#M18925</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2020-10-02T15:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/376248#M18946</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt;&amp;nbsp; it's working&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 07:29:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/376248#M18946</guid>
      <dc:creator>prasadcolumbus</dc:creator>
      <dc:date>2020-10-05T07:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/402717#M20721</link>
      <description>&lt;P&gt;Hello Kevin,&lt;BR /&gt;I am getting isMobile = true for Android but not on iOS phones. What do you think the issue is?&lt;BR /&gt;Thank you in advance,&lt;BR /&gt;George&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 12:43:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/402717#M20721</guid>
      <dc:creator>georgemarket8</dc:creator>
      <dc:date>2021-01-25T12:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/402842#M20728</link>
      <description>&lt;P&gt;Found it.&lt;BR /&gt;The agent value is different from a mobile to another. So splitting it doesn't work. Therefore I went for this solution below:&lt;BR /&gt;{% set agent = request.headers['user-agent']|lower|string %}&lt;BR /&gt;{% set is_mobile = false %}&lt;BR /&gt;{% if agent is string_containing "mobile" %}&lt;BR /&gt;{% set is_mobile = true %}&lt;BR /&gt;{% endif %}&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 16:02:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/402842#M20728</guid>
      <dc:creator>georgemarket8</dc:creator>
      <dc:date>2021-01-25T16:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/403218#M20753</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/64576"&gt;@georgemarket8&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;thanks for adding your solution to the post &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 15:07:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/403218#M20753</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-01-26T15:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/408646#M21121</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 00:44:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/408646#M21121</guid>
      <dc:creator>georgemarket8</dc:creator>
      <dc:date>2021-02-12T00:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/458444#M24026</link>
      <description>&lt;P&gt;Hey! where exactly I place this code? Should I add this to my forms? Sorry not a developer lol&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 18:17:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/458444#M24026</guid>
      <dc:creator>linealves</dc:creator>
      <dc:date>2021-07-13T18:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Detect mobile device on hubl coding?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/459257#M24045</link>
      <description>&lt;P&gt;Heyy!&lt;BR /&gt;You can play with the below code in a custom module that you create:&lt;BR /&gt;&lt;SPAN&gt;{% set agent = request.headers['user-agent']|lower|string %}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{% set is_mobile = false %}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;YOUR DESKTOP CONTENT GOES HERE......&lt;BR /&gt;&lt;SPAN&gt;{% if agent is string_containing "mobile" %}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{% set is_mobile = true %}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;YOUR MOBILE CONTENT GOES HERE......&lt;BR /&gt;&lt;SPAN&gt;{% endif %}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 18:00:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Detect-mobile-device-on-hubl-coding/m-p/459257#M24045</guid>
      <dc:creator>georgemarket8</dc:creator>
      <dc:date>2021-07-14T18:00:31Z</dc:date>
    </item>
  </channel>
</rss>

