symfony: iphone version of the website

by prettyscripts on 2009-09-14 12:54:00

symfony

just follow this documentation. it’s written for symfony 1.1, but it works on V1.2.

templates

a few notes that's not explicitly written in the doc.

for every template file you need an iphone version. or it will break - depends on your server setting, typically a blank page will be displayed.

what that means is, if the template is named template.php, you need template.iphone.php. you need it for every single templates in your application (or project).

quick fix

if there are too many template files, only certain templates require to be iphone-friendly and others can be dealt with later, just make an iphone-version of the required template and make a copy of all other templates with extension .iphone.php. then work on each template one-by-one or on demand.

i work on linux so just link all files with the following commands for all templates:

$ ln file.php file.iphone.php

this will ensure changes to one template will still look consistent on the other. important: do not edit the iphone templates directly! unlink and create a new file.

as a good practice, have file name information in the header of your code so you know which file you are editing.

Tags: iphone, symfony

No feedback yet

Leave a comment


Your email address will not be revealed on this site.
PoorExcellent
note: all comments are moderated. do not spam and do not advertise. only comments relevant to the post will be published.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)