Supporting views while keeping compatibility
June 27th, 2008 | Published in iGoogle
As we begin to ramp up support for the canvas view in iGoogle, it's important to remember that not all users will get access to the canvas view simultaneously.
If you've upgraded one of your gadgets to use views, you can keep backwards compatibility by keeping your old content section in your XML. Just make sure it appears first in your list of content sections and that it doesn't set a view attribute. Your new content sections with view="home" and view="canvas" can follow in any order.
Users without access to canvas view see this.
]]>
Users with canvas view see this in the "home" view.
]]>
Users with canvas view see this in the "canvas" view.
]]>
Once you've set up your gadget in this way, anyone who uses an iGoogle domain that doesn't yet have access to the canvas view can see a working version of your gadget. And those who have been moved to the new interface will see all the hard work you've put into your home and canvas views.
As an added bonus, you can use this technique now to develop gadgets in the developer sandbox that still maintain their old behavior in production. Whenever more users do get access to the canvas view, your gadgets will be ready to go.