How to Add Desktop Version and Mobile Version Link?

Is it possible to have a link at the footer to show desktop version and mobile version?
I would like mobile users to be able to switch to desktop version of the site.

5 answers

Profile photo of Seoki Lee 1510.00 $tone September 30, 2014
Public

Yes, you can achieve that by creating 2 statics blocks (CMS >> Statics block) "footer-links" and "mobile-footer-links" and edit files:

-- \app\design\frontend\default\jm_kidslandtemplate\ page\html\footer.phtml, add this rule:

Code:

<div class="footer-links">
	<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer-links')->toHtml() ?>
</div>
<div class="mobile-footer-links">
	<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('mobile-footer-links')->toHtml() ?>
</div>

-- \skin\frontend\default\jm_kidsland\css\styles.css, at the end of file add this rule:

Code:

.mobile-footer-links {
	display: none;
}

-- \skin\frontend\default\jm_kidsland\css\layout-mobile.css, at the end of file add this rule:

Code:

.footer-links {
	display: none;
}

.mobile-footer-links {
	display: block;
}
#1
Profile photo of Seoki Lee 1510.00 $tone October 1, 2014
Public

I’m terribly sorry for my above post as I misunderstood your question. I thought that you want to have 2 different static blocks to view in mobile and desktop separately.

For your question, I’m afraid that it’s impossible to switch between mobile and desktop view as there are not different layouts for these 2 view ports. This JM Kidsland is responsive theme which means that it will be automatically adapt to screen resolution.

#3
Profile photo of Seoki Lee 1510.00 $tone October 2, 2014
Public

No we can’t over-ride the CSS. But you can try to use theme iphone (default of magento) for all mobile view. To enable iphone theme please login to admin and goto System >> Configuration >> Click on General in the left hand menu and then Design >> Expand the theme section and then configure the following exceptions under Templates, Skin and Layout:

Matched Expression: iPhone|iPod|Android|Mobile

Value: iphone

#5

Please login or Register to Submit Answer

Written By

Comments