Jump to content

Modules not Loading for Mobile or Desktop


TomH

Recommended Posts

Okay I have 2 similar modules that load in different positions.

 

I have added to module 1

 

hidden-phone

 

I have added to module 2

 

hidden-desktop hidden-tablet

 

From my understanding reading the iReview docs is that these modules will not load if the specified device is detected (as apposed to the bootstrap classes like hidden-xs which just hides elements which are then still visible in the source). Is this correct?

 

These modules are ads and basically module 1 loads in the left sidebar which is fine for desktop and tablets when the sidebar is loaded at the side of the content (instead of underneath the content on smaller viewports) as the user will view it along with the content.

 

On phones where the sidebars are loaded underneath the content I have module 2 load in positoin-12 above the content so the user sees the ad first and then the content.

 

I have 2 problems.

 

Module 1 seems to work fine but Module 2 seems to ignore the hidden-desktop hidden-tablet classes and is always displayed. I am testing this using MS Edge, Firefox and Google Chrome (using development tools to spoof the user agent). Any guesses as to why this would be?

 

The second problem deals with Joomla caching. I notice that the cache doesn't care what the user agent is so if the cached page has not expired it will display the cached page independent of the fact if it was created with a phone browser or a desktop web browser . If the cached page is expired then when the page loads it then takes into account the user agent and loads module 1 as appropriate

 

Is there a fix for this besides disabling the Joomla cache which is needed to keep the site loading at a decent speed?

 

Finally on page 39 of the iReview pdf docs the "hidden-tablets" class is referenced. I assume that should be "hidden-tablet" (without the s)

 

Thanks

 

Tom

 

Link to comment
×
×
  • Create New...