Disable field on mobiles

More
6 years 2 months ago - 6 years 2 months ago #74787 by lipatovroman
Hello!
I trying to optimize loading page speed on mobiles.

This is FC page speed on mobiles:

I have Advanced Module Manager. I disabled all modules from sidebar and other on mobile.



I'm sure, we should have same option for each FC field.

For example, I have Navigation filed on desktop version of site. But I absolutely no need this filed on mobile version.
I found  mobiledetect.net for this.
Also this  stackoverflow.com/questions/4117555/simp...tect-a-mobile-device
And this (Joomla plugin)  www.yagendoo.com/en/product/mobile-detection-joomla-plugin.html
May be it will help.
Last edit: 6 years 2 months ago by lipatovroman.

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago - 6 years 2 months ago #74788 by ggppdk
Replied by ggppdk on topic Disable field on mobiles
Hello

we have already integrated this library,

in fields  (e.g. image-gallery field can use different layout for mobile / Tablets)
in our modules (see parameter in modules) !!
but did not make large use of it in fields because Joomla view caching did not support it

- but last 1 , or 2 years Joomla caching supports it
just joomla caching does not distinguish between
- Mobiles (Phones)
and
- Tablets

treating them both of the above as "Mobile"

But then again the above is not relevant ... because we are already creating different caching IDs for this in our frontend component views !!
different caching IDs for
- Mobile (phones)
- Tablet
- Desktop

to make this reply shorter
everything is in place,
only configuration parameters need to be added in the fields

i think something like a multi select you proposed
show in
- desktop
- tablet
- mobile

and by default if the parameter is not set all values will be selected
thus we will keep existing websites from suddenly changing behavior


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 6 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #74790 by lipatovroman
Very good.
It's really very useful feature.
Thanks.

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #74792 by ggppdk
Replied by ggppdk on topic Disable field on mobiles
Hello

before adding something "very nice" and "easy" (easy because all the other needed work is already done)

Need to decide if the parameter is the proper way

- If the parameter suggested above will contradict the usage of a "different" viewing layout for mobile devices
(fields that need this can be added with this any time without causing problem, so i think this parameter will not have negative implications)

- Also the "isMobile" and "isTablet" is calculated once per page load for all page and it is very fast, so no performance issue here either


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #74794 by lipatovroman
So, are you going to add this feature?

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago - 6 years 2 months ago #74804 by lipatovroman
Also, how to use this library in FC templates?
For example - I have big description.
I want this description displays on Desktops.
But I need on mobiles this description displays Full only by pressing button "Display more details".
So, I have code for that:
Code:
<script src="readmore/readmore.js"></script> <script> jQuery('article').readmore({ moreLink: '<div class="center"><a class="displaymore" href="#">More details</a></div>', lessLink: '<div class="center"><a class="hidemore" href="#">Collapse</a></div>' }); </script>
It seems I need some code like:
Code:
if (($mobile) || ($tablet)) { ?> Some HTML or JS <?php }
Last edit: 6 years 2 months ago by lipatovroman.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.440 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline