When I am creating a custom Drupal site, I like to hard code a few things into the templates, such as the site name and menus. Posted on JJCategories Tutorials Tags development, local, MAMP, mobile, server, testing, virtual host Accessing Drupal Site Name and Menus in Templates This is a really great solution for testing on multiple devices without having to push code up to a server. I’ve also found this method helpful for sharing my current progress with co-workers in my office. #MAMP PRO TOTAL MAX VIRUTAL HOSTS FULL#Now you can test your full site locally from any other device on your local network. Now open the address you set as your alias in a browser on your mobile device.For example, if you have a project called “mysite” and your IP address is 10.0.0.1, you would enter something like this: Add a new xip.io alias using your local IP address. There is an “Aliases” box under general settings. Now go to the “Hosts” tab, and select the virtual host that you would like to test.Be aware that if your router uses DHCP to assign IP addresses, the address may change after rebooting or reconnecting your computer. Under the “Status” on your connected network device, it will show your IP address. In OS X, you can do this by opening “System Preferences” and selecting “Network”. Set up your project in MAMP just like normal.Also, your computer and mobile device(s) will need to be on the same local network. Note: I think this will only work with MAMP PRO, because you need access to the virtual hosts feature. To do this, check out the instructions below. #MAMP PRO TOTAL MAX VIRUTAL HOSTS PRO#If you use MAMP PRO for local development, this service makes it super easy to test each of your sites on mobile. This allows you to have a real domain to use for each of your local virtual hosts. Xip.io is a magic domain name that provides wildcard DNS for any IP address. One of the easiest ways I’ve found to do this is to use xip.io, a service created by 37signals. Testing mobile websites locally can be done by simply resizing the browser window on your computer, but sometimes you just want to test the experience on an actual mobile device. Update: I wrote these instructions using MAMP PRO 2, and I just noticed that it looks like version 3 has some kind of xip.io support built in.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |