Re: How to modify metadata on Control Pages
Ah, User-Agent sniffing. In the basereqhandler.py file, located here:
- Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 4/IndigoWebServer/indigopy/
There is a method called _IsiPhone (line 292) - it snarfs out whether the User-Agent header contains "iPhone" or "iPod", and returns True if it does, False otherwise. We then set a global boolean template variable, $iphone, to that value and use it in various templates to show/hide/reformat things. You can probably just hack the IsiPhone method to also search for the appropriate User-Agent information for the Pre - apparently it does contain "Pre" so it should be rather simple. Let us know if it works and we'll add it in.
General note to everyone: if you write IWS plugins, you also have access to that variable (or if you're hacking the built-in templates) so feel free to use it.