Inhalte aufrufen

Profilbild

Confusion around mobile themes


3 Antworten zu diesem Thema

#1 nickh

nickh

    Advanced Member

  • Members
  • 56 Beiträge

Geschrieben: 20 April 2015 - 09:21

Hi guys,

 

I have a custom theme which I use to display customised versions of some of the SmartStore views (as well as general styling changes, of course).  Some of the views in this theme also have a ".mobile" alternative, but when I view the site on a mobile device it uses the standard SmartStore Mobile view (I think it's called "Alpha").

 

My question is:

 

If a .Mobile view exists in the main (desktop) theme, why does it use the Mobile theme instead?  Also, what does the "useMobile=true" property mean in the theme config file?



#2 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1015 Beiträge

Geschrieben: 20 April 2015 - 17:10

Unfortunately mobile view resolution doesn't work this way: you'd have to put your custom mobile view into the mobile theme's folder, because it's a theme on its own. When you access your shop with a mobile device, the system's mobile theme is being served (Mobile by default), and not the desktop theme. Our custom view engine first tries to resolve a mobile view from this mobile theme folder, then falls back to the main Views folder, and not to your custom desktop theme.

 

Concerning useMobile: there is absolutely no occurrence of this attribute in any code file. What exactly do you mean?


Murat Cakir
SmartStore AG


#3 nickh

nickh

    Advanced Member

  • Members
  • 56 Beiträge

Geschrieben: 20 April 2015 - 20:14

So does this mean that the .mobile views in my desktop theme are pointless (since requests from mobile devices will always use the separate mobile theme)?

 

And sorry - by "useMobile" I actually meant "mobileTheme".  This is a property in the theme.config file.  Please could you explain what this does?



#4 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1015 Beiträge

Geschrieben: 20 April 2015 - 20:48

So does this mean that the .mobile views in my desktop theme are pointless (since requests from mobile devices will always use the separate mobile theme)?

 

Yes.

 

 

And sorry - by "useMobile" I actually meant "mobileTheme".  This is a property in the theme.config file.  Please could you explain what this does?

 

It classifies the theme as a mobile one. Without this attribute set to true, the theme woul also be served to desktop devices.


Murat Cakir
SmartStore AG




Auf dieses Thema antworten