Yii Framework Forum: Mobile website, best practice - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Mobile website, best practice Rate Topic: -----

#1 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 09 June 2011 - 02:41 PM

Hi all,

I've programmed a website for computer browsers, but would like to expand with a mobile version.
Right now I've got all view files in one theme and view folders for each language.

The problem is; for mobile content I only need to change the layout file, but would like to have the ability to change the view file too.

What is best practice? How do you do? And is it possible to use one theme but another theme as backup, if files don't exist?

Thanks for your input!

#2 User is offline   twisted1919 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 702
  • Joined: 23-October 10
  • Location:Romania

Posted 09 June 2011 - 03:01 PM

Why not create a "mobile" theme and serve it for mobile devices ?
It might sound as it is a bit more work, but in the end, maybe the versions should stay separate.
For the mobile websites, you'll always do workarounds and tweaks so that you can mimic the browser behavior on mobile devices, this means, in the long run, you'll have advantages if you separate them(only the themes of course).

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,710
  • Joined: 10-October 10
  • Location:Denmark

Posted 09 June 2011 - 05:17 PM

Check this blog post out:
You can use media queries, a feature of CSS3.
Like this:
<link rel="stylesheet" type="text/css"   media="screen and (max-device-width: 480px)"   href="shetland.css" />

Sounds very interesting.
I am planning to take it for a spin 'real soon'. :)
"Less noise - more signal"

#4 User is offline   Phill Jaques 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 20-November 12

Posted 07 December 2012 - 12:43 AM

I have a pretty heavy website and i was wondering is it possible to get a mobile version of my website? And how do i get one? I fear that if i don’t do get it done soon; i might lose out on potential customers due to download restrictions in netherlands (i am based here).

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users